Mailinglist Archive: opensuse (3434 mails)

< Previous Next >
Re: [opensuse] amavisd warning failure? - SCRIPT SORTED OUT
  • From: Sandy Drobic <suse-linux-e@xxxxxxxxxxxxxxxxxxxxxxx>
  • Date: Mon, 18 Feb 2008 16:43:19 +0100
  • Message-id: <47B9A797.8010503@xxxxxxxxxxxxxxxxxxxxxxx>
Hylton Conacher (ZR1HPC) wrote:

case "$statusclam" in

0 ) echo "Clamav has gotten new sigatures!"

tempnew=`mktemp`
tr '\015' '\012' <$tempfile >$tempnew
rm $tempfile
cat $tempnew |col -x | mail -s "Clamav has received new signatures!" $EMAIL
rm $tempnew;;


;;
1 ) echo "Clamav is up-to-date"
;;
255) cat $tempfile | mail -s "Clamav could not update: $statusclam"
$EMAIL #2008-02-18 was coluld'nt
;;
esac

rm $tempfile
**End of script**

Just waiting for a 'Success' email to tell me that all is up to date to
offset the FAILURE emails I have been getting since yesterday up until
14h15 today. Looking at the script though, it doesn't look like I'm
gonna get one :)

I was fed up with the number of emails that I got from the original script (I update every hour and the script sent the status each time. So I disabled the email for "clamav is up-to-date". I still got too many status mails, so I finally decided to only send an email if a problem occured.
--
Sandy

List replies only please!
Please address PMs to: news-reply2 (@) japantest (.) homelinux (.) com
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >