Update docker/clam/docker-entrypoint.sh
This commit is contained in:
parent
f40970a2cd
commit
0d7d49738f
|
@ -1,6 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set +x
|
set +x
|
||||||
|
|
||||||
MODE=${1:-"scan"}
|
MODE=${1:-"scan"}
|
||||||
|
|
||||||
temp_log_file="/tmp/clamav_scan_$(date +%Y%m%d_%H%M%S).log"
|
temp_log_file="/tmp/clamav_scan_$(date +%Y%m%d_%H%M%S).log"
|
||||||
|
@ -62,7 +61,8 @@ report() {
|
||||||
|
|
||||||
if [ "$infected_files" -gt 0 ]; then
|
if [ "$infected_files" -gt 0 ]; then
|
||||||
echo "Reporting detections to GlitchTip..."
|
echo "Reporting detections to GlitchTip..."
|
||||||
go-glitch report --dsn "$GLITCHTIP_DSN" --message "ClamAV Scan: $infected_files infected files found" || echo "Failed to report to GlitchTip"
|
create_temp_log "$log_file"
|
||||||
|
go-glitch report --dsn "$GLITCHTIP_DSN" "$temp_log_file" || echo "Failed to report to GlitchTip"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue