Panda update script

Victor DiMichina victor at PIXELMAGICFX.COM
Mon Nov 29 20:33:38 GMT 2004


    [ The following text is in the "ISO-8859-1" character set. ]
    [ Your display is set for the "US-ASCII" character set.  ]
    [ Some characters may be displayed incorrectly. ]

I've seen a few posts over the last few months in the archives
requesting a Panda  auto-update script.    I've posted this a couple of
times in the past,  here it is again for anyone interested.
Obviously,  replace the "username" and "password" with your own.   ;)
Add it to your cron script,  and make sure your firewall allows port
8003 to be accessed.

vic


------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the MAQ (http://www.mailscanner.biz/maq/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).

Support MailScanner development - buy the book off the website!

    [ Part 2: "Attached Text" ]

#!/bin/bash

#
# Panda Antivirus Linux PAV.SIG downloading script
# ------------------------------------------------
# pavupdate.sh ----------------------- version 1.0
# 
# This script takes care of downloading and installing 
# the antivirus signature file (pav.sig). It is very suitable
# to be set as a daily cron job on your PAV Linux server.
# It should not be world/group readable as it contains
# your update username/password in cleartext. Read the
# "README" file for more details on dependencies and such.
#
# (c) Copyright Daniel Nyström <dny at pcmint.se>, 
#               PCM International AB, Sweden.


# Configuration section. Set the user and pass variables. You should not
# need to touch the path var...

USER="<username>"
PASS="<password>"
PATHTOPAVSIG="/usr/lib/panda/pav.sig"

# Preparing other variables... Do not modify if you don't know what
# you are doing...

DATE=`date +%m%d`
GETSTRING="http://updates.pandasoftware.com:8003/software/basevirus/pav$DATE.zip"
TEMPDIR="/tmp"
STARTDIR=`pwd`

# Doing it.
clear
echo ""
echo "======= PCM INTERNATIONAL ======="
echo "================================="
echo "= Panda Antivirus Linux Updater ="
echo "================================="
echo "===================== version 1.0"
echo ""
echo "Starting..."

# Changing dir and downloading...
cd $TEMPDIR
echo "Downloading..."
wget --http-user=$USER --http-passwd=$PASS $GETSTRING


# Checking for errors... Then unzipping...
if [ -f pav$DATE.zip ] 
then
        echo ""
        echo "File download successful! unzipping.."
        unzip pav$DATE.zip
else
        echo ""
        echo "File download _not_ successful!"
        echo "Check your configuration..."
        exit
fi


# Checking for errors... Then installing...
if [ -f PAV.SIG ]
then
        echo "Unzipping successful! Installing..."
        rm -f pav$DATE.zip
        mv PAV.SIG $PATHTOPAVSIG
else
        echo "Unzipping _not_ successful!"
        echo 'Check that your system has the "unzip" util...'
        exit
fi

# All the action is over :) 

echo ""
echo "Update complete. Have a nice day!"
echo ""

# EOF pavupdate.sh, version 1.0
#
# (c) Copyright Daniel Nyström <dny at pcmint.se>, 
#               PCM International AB, Sweden.



------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the MAQ (http://www.mailscanner.biz/maq/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).

Support MailScanner development - buy the book off the website!



More information about the MailScanner mailing list