  | |  | Up2date Script Need Modified | Up2date Script Need Modified 2002-08-26 - By Thom Paine
Back On Mon, 2002-08-26 at 16:36, Michael Schwendt wrote:
> > This one? It 's to be executed as a cron job. > > #! /bin/sh > renice +19 >/dev/null 2 >&1 > /usr/sbin/up2date -u --nox & > up2date.log > if ! grep -q "There are no packages available for update " \ > && ! grep -q "Free service limited due to high load " up2date.log ; then > cat up2date.log > fi
How can I adapt this script to work with my antivirus update script? It pumps out some crap while it works and I 'd like to eliminate that as well.
Here is my update script.
#!/bin/sh mailto= "thom@(protected) " tstamp=`date` hostname=`hostname`
### Create a temporary dir in /tmp pushd /tmp mkdir sigupdate pushd sigupdate
### Get signature update file via ftp ftp ftp.nai.com
### Unpack signature file export filename=`ls dat-*.tar` tar -xf $filename
### Move signature files to virus-scan directory mv *.dat /usr/local/uvscan
### Clean up temp directory and leave rm $filename rm * popd rmdir sigupdate popd
### Send an e-mail to the administrator about update export output=`/usr/local/uvscan/uvscan --version` mail -s "VIRUS SIGNATURE FILES UPDATED " $mailto < <eoi
Date: $tstamp The virus signature files on $hostname have been updated.
$output
eoi
exit 0
I made this script from the mcafee administrator manual. But everytime it runs, I get an email to root from cron with some info in it that is meaningless. As you can see from the script, I get an email upon completion with the version of the new dats.
Thanks.
-- -=/ >Thom Red Hat Linux release 7.3 (Valhalla) running Linux Kernel 2.4.18-10 Uptime: 5:07pm up 5 days, 1:50, 2 users, load average: 0.42, 0.20, 0.12 Registered Linux User #214499
http://counter.li.org
|
|
 |