Top Nav

Archive | Malware

Cronjob for ClamAV

ClamAV can be useful for things like scanning a web root for viruses. Use this handy script with a cron job to setup nightly scans that send an email report.

Follow the directions on the site to install. We’ve modified the last line of the script so that it will work properly. Comment out the last line in /usr/local/bin/clamav-cron and add the following line to fix portion of the script that sends email. Make sure mailx is installed.

You can use crontab -e to open up the cron editor and add the following entry:

This tells ClamAV to scan /var/www/vhosts each morning at 3am and send an email report.