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.
PHP Code:
#!/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
Recent comments
11 hours 29 min ago
11 hours 35 min ago
16 hours 33 min ago
23 hours 14 min ago
1 day 3 min ago
1 day 1 hour ago
1 day 5 hours ago
1 day 12 hours ago
1 day 16 hours ago
1 day 17 hours ago