Noel Jones wrote the following on 12/9/2006 6:01 PM -0800: > At 06:02 PM 12/9/2006, Bill Landry wrote: >> Noel, that doesn't really work for me, as I download all MSRBL & >> SaneSecurity databases at the same time (that's for sig databases), and >> if a single sig database file fails, that doesn't mean all failed. I >> still want to copy the good database sig files into the clamav directory >> so they can be used. > > > Yes, exactly. This will work fine for you. > > (cd to some tmp dir) > (download all your custom sigs) > (gunzip the gzipped files) > > For name in *db > do > clamscan --quiet -d $name && \ > cp -p $name /var/db/clamav > done > > All good signatures will be copied, corrupt sig databases will be > ignored. You can get fancier with checking exit status, using mv to > insure atomic updates, or triggering a clamd reload, but the above > simple script will do the job fine.
Yep, that would probably work fine. However, in the mean time, based on your feedback, I put the following together: ========== cd /var/tmp/clamdb/ wget --tries=5 -N http://www.sanesecurity.com/clamav/phish.ndb.gz && \ gunzip -df phish.ndb.gz > phish.ndb && \ clamscan --quiet -d phish.ndb && \ cp --reply=yes /var/lib/clamav/phish.ndb /var/lib/clamav/phish.ndb-bak && \ mv -f phish.ndb /var/lib/clamav/phish.ndb wget --tries=5 -N http://www.sanesecurity.com/clamav/scam.ndb.gz && \ gunzip -df scam.ndb.gz > scam.ndb && \ clamscan --quiet -d scam.ndb && \ cp --reply=yes /var/lib/clamav/scam.ndb /var/lib/clamav/scam.ndb-bak && \ mv -f scam.ndb /var/lib/clamav/scam.ndb wget --tries=5 -N http://download.mirror.msrbl.com/MSRBL-SPAM.ndb && \ clamscan --quiet -d MSRBL-SPAM.ndb && \ cp --reply=yes /var/lib/clamav/MSRBL-SPAM.ndb /var/lib/clamav/MSRBL-SPAM.ndb-bak && \ mv -f MSRBL-SPAM.ndb /var/lib/clamav/MSRBL-SPAM.ndb wget --tries=5 -N http://download.mirror.msrbl.com/MSRBL-Images.hdb && \ clamscan --quiet -d MSRBL-Images.hdb && \ cp --reply=yes /var/lib/clamav/MSRBL-Images.hdb /var/lib/clamav/MSRBL-Images.hdb-bak && \ mv -f MSRBL-Images.hdb /var/lib/clamav/MSRBL-Images.hdb /usr/local/sbin/clamd reload ========== Bill _______________________________________________ Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net http://lurker.clamav.net/list/clamav-users.html