PDA

View Full Version : possible update


webstergd
7th May 2006, 23:39
Hey till or falko,

Hey Sorry I haven't done anything in a few months. However, I was recently playing with clamav and noticed it isn't set to allow for auto update. I set this up on my server and it appears to work fine. I haven't tested it fully.

Here is how it is done.
Edit the script that writes clamd.conf /home/admispconfig/ispconfig/tools/clamav/etc/clamd.conf/home/admispconfig/ispconfig/tools/clamav/etc/clamd.conf

Add the lines
DNSDatabaseInfo current.cvd.clamav.net

optional
DatabaseMirror db.XY.clamav.net
where XY is the country code

then have a cron.d job that runs every night with
freshclam -v

falko
8th May 2006, 00:13
ISPConfig uses the freshclam daemon to update the virus signature database, without a cron job. If you run ps aux|grep freshclam you'll see it.

webstergd
8th May 2006, 21:40
I was pretty sure you had it to auto update. sorry guys :-)

djtremors
18th June 2006, 02:52
hey, I just noticed this post and thought I'd throw this in.

My current (non ispc) server which runs clamav on it for mail does one special little trick which I'd like to share with everyone (since I never hear that anyone has done it).

With the 'freshclam' command getting new pattern updates, I noticed that it can't do anything about the program itself. I haven't really checked on the net for anything that automates it but for those of you who like using tar.gz sources and not RPMs like myself, here's an autoupdate script i wrote which has been working for a year or two to auto update clamav itself.

#!/bin/bash
LOG="/var/log/clamav-prog-update.log"

STATUS="`/usr/local/bin/freshclam --log=/var/log/clam-update.log 2>&1 | grep \"WARNING: Local version\"`"

NEW="`echo $STATUS |awk {'print $7'}`"
OLD="`echo $STATUS | awk {'print $4'}`";

# If it's OLD, updated it.
if [ "$NEW" ]; then
cd /usr/src/source

wget http://easynews.dl.sourceforge.net/sourceforge/clamav/clamav-$NEW.tar.gz >$LOG 2>&1
cd ..

tar xvfz source/clamav-$NEW.tar.gz >$LOG 2>&1
cd clamav-$NEW

../compile-clamav >$LOG 2>&1

RESULT="$?"

if [ "$RESULT" = 0 ]; then
echo "OLD=$OLD NEW=$NEW"
rm -fr /usr/src/clamav-$OLD/ >$LOG 2>&1
service amavisd restart >$LOG 2>&1
fi

fi

till
18th June 2006, 19:20
Nice script :)