Mailinglist Archive: opensuse (3434 mails)
| < Previous | Next > |
Re: [opensuse] amavisd warning failure? - SCRIPT SORTED OUT
- From: "Hylton Conacher (ZR1HPC)" <hylton@xxxxxxxxxxxxxx>
- Date: Mon, 18 Feb 2008 17:31:11 +0200
- Message-id: <47B9A4BF.8080701@xxxxxxxxxxxxxx>
Sandy Drobic wrote:
You are correct. Somehow the damn gremlins must have crept in twice as
when I copied and pasted from your email, saved the script and then ran
it, I got that ClamAv was up to date.
I did change a small part of the script...changed "could'nt" to "could not".
It is not necessary to post the script as all seems OK, other than
possibly adding an email notification to advise of update success.
**Start of script**
#!/bin/sh
# update of clam-av signatures
EMAIL=postmaster@xxxxxxxxxxx
tempfile=`mktemp`
freshclam > $tempfile
statusclam=$?
#echo "test clam" > $tempfile
#statusclam=0
case "$statusclam" in
0 ) echo "Clamav has gotten new sigatures!"
;;
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 :)
Anyway, now the script is sorted, time to tackle the next bit of your
email Sandy that I printed regarding amavisd.
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
Hylton Conacher (ZR1HPC) wrote:
Sandy Drobic wrote:
Hylton Conacher (ZR1HPC) wrote:
Next problem was the script to update the clamav signatures.
<snip>
Yes.I assume that What should I put my email address in place of
EMAIL=postmaster@xxxxxxxxxxx?
When I run the script manually I get:
Umalusi:~ # /etc/cron.hourly/Clam-signature-update.sh
/etc/cron.hourly/Clam-signature-update.sh: line 19: unexpected EOF while
looking for matching `"'
/etc/cron.hourly/Clam-signature-update.sh: line 24: syntax error:
unexpected end of file
Umalusi:~ #
Now what, as my script looks exactly like you wrote?
Can't be, I just did a simple copy-and-paste and ran the script. It worked.
You are correct. Somehow the damn gremlins must have crept in twice as
when I copied and pasted from your email, saved the script and then ran
it, I got that ClamAv was up to date.
I did change a small part of the script...changed "could'nt" to "could not".
It is not necessary to post the script as all seems OK, other than
possibly adding an email notification to advise of update success.
**Start of script**
#!/bin/sh
# update of clam-av signatures
EMAIL=postmaster@xxxxxxxxxxx
tempfile=`mktemp`
freshclam > $tempfile
statusclam=$?
#echo "test clam" > $tempfile
#statusclam=0
case "$statusclam" in
0 ) echo "Clamav has gotten new sigatures!"
;;
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 :)
Anyway, now the script is sorted, time to tackle the next bit of your
email Sandy that I printed regarding amavisd.
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
| < Previous | Next > |