Update docker/clam/docker-entrypoint.sh
ci/woodpecker/push/woodpecker Pipeline was successful Details
ci/woodpecker/cron/woodpecker Pipeline was successful Details

This commit is contained in:
colin 2024-10-29 17:04:25 -04:00
parent f40970a2cd
commit 0d7d49738f
1 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,5 @@
#!/bin/sh
set +x
MODE=${1:-"scan"}
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
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
}