Friday, March 4, 2011

GetClams!

Do you use ClamAV in a Linux environment? I do, and if you do then you know every once in a while you get the following alert:

ClamAV update process started at Fri Mar 4 08:52:27 2011
WARNING: Your ClamAV installation is OUTDATED!
WARNING: Local version: 0.96.5 Recommended version: 0.97
DON'T PANIC! Read http://www.clamav.net/support/faq
main.cld is up to date (version: 53, sigs: 846214, f-level: 53, builder: sven)
daily.cld is up to date (version: 12804, sigs: 64546, f-level: 60, builder: ccordes)
bytecode.cld is up to date (version: 140, sigs: 40, f-level: 58, builder: edwin)



It used to be a hassle to update ClamAV, so I wrote a bash script to do this automatically. Now when I get this warning, I just run a bash script I wrote called "getclams" , enter the recommended version number from the alert message (0.97 in this case) and all the rest is automatic. Feel free to use the script below in your environment if you choose.

"getclams"

echo
echo -e "What version to get? IE '0.94.2' : \c"
read clamver
echo "You are about to upgrade to CLAMAV version $clamver"
cd /tmp
wget http://downloads.sourceforge.net/project/clamav/clamav/$clamver/clamav-$clamver.tar.gz?use_mirror=cdnetworks-us-1
tar -zxf clamav-$clamver.tar.gz
cd clamav-$clamver
./configure
make;make install;make clean
freshclam
echo
echo "done"

No comments: