Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for empty $INFECTED_FILES #2594

Merged
merged 2 commits into from
Nov 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions apps/clamav.sh
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,11 @@ fi
INFECTED_FILES_LOG="\$(sed -n '/----------- SCAN SUMMARY -----------/,\$p' $VMLOGS/clamav-fullscan.log)"
INFECTED_FILES="\$(grep 'FOUND$' $VMLOGS/clamav-fullscan.log)"

if [ -z "$INFECTED_FILES" ]
then
INFECTED_FILES="No infected files found"
fi

# Send notification
if ! send_mail "Your weekly full-scan ClamAV report" "\$INFECTED_FILES_LOG\n
\$INFECTED_FILES"
Expand Down