Created
May 10, 2019 00:44
-
-
Save Lbrewbaker/63774fee294b46e58448aa0579fe6275 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
LOGFILE="/var/log/clamav/clamav-$(date +'%Y-%m-%d').log"; | |
DIRTOSCAN="/home/brewbs"; | |
for S in ${DIRTOSCAN}; do | |
DIRSIZE=$(du -sh "$S" 2>/dev/null | cut -f1); | |
echo "Starting a daily scan of "$S" directory. | |
Amount of data to be scanned is "$DIRSIZE"."; | |
clamscan -ri "$S" >> "$LOGFILE"; | |
done | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment