For those admins that uses sophos.

Here is a script, just in case, you want your sophos IDE to be updated
automatically.
This is actually the script which I used for other amavis+sophos+postfix
setup in linux.
Just take note of the directories. Btw, it's kinda long but it works. I
never had any
problem with it. ENJOY!!!!

1.) in my cron/username
30 0-23/12 * * 1,3,5,7  /usr/sbin/chkviruside

2.)
# cat chkviruside
#!/bin/sh
cd /usr/local/sav
/usr/bin/fetch http://www.sophos.com/downloads/ide/347_ides.zip
today=`date`
if [ -f /usr/local/sav/347_ides.zip ]; then
output1=`ls -l /usr/local/sav/347_ides.zip | awk '{print $5}'`
output2=`ls -l /usr/local/sav/347_ides.zip.bak | awk '{print $5}'`
if [ "$output1" != "$output2" ]; then
        cd /usr/local/sav
        rm -f 347_ides.zip.bak
        /usr/local/bin/unzip -n 347_ides.zip
        /usr/sbin/chown autovirusbot *.ide
        # /bin/chmod 644 *.ide
        /usr/local/bin/sweep -v
        mv 347_ides.zip 347_ides.zip.bak
        echo 
        echo "--------------------------------------------------------"
        echo "This is a generated mail from FreeBSD Email-Gateway Server"
        echo "--------------------------------------------------------"
        echo
        echo "Today is $today"
        echo
        echo
        echo
        echo "Hi Virusalert Team,"
        echo 
        echo "I have just added a new Sophos Virus Identity!"
        echo
        echo "More to come. :-)"
        echo
        echo 
        echo "Concerned robot,"
        echo
        echo Postmaster 
        echo
   else
        cd /usr/local/sav
        rm -f 347_ides.zip
        echo "Sophos Virus Identity is still upto date!"
      exit 0
fi
else
   echo
   echo "ALERT! There could have been a download problem."
fi
_
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]

To subscribe to the Linux Newbies' List: send "subscribe" in the body to 
[EMAIL PROTECTED]

Reply via email to