> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Allan
> Joergensen
> Sent: Thursday, February 17, 2005 9:16 AM
> To: clamav-users@lists.clamav.net
> Subject: [Clamav-users] freshclam question
>
>
> Hi,
>
> in order to insure that the database is always up to date I'm trying to
> use OnErrorExecute/OnUpdateExecute to generate alerts in our monitoring
> system, so far with little luck.
>
> I've tried both OnUpdateExecute logger -t .....
> and OOnUpdateExecute /path/to/script none of them seems to work.
>
> I see no obviuos reasons why this isn't working.
>

You have to know that even if you run freshclam with root, it setuid's to
the clamav user.
That said, you have to be sure that that user can log (have homedir and
stuff) and run the script.

In my case I had to add some env vars to run the script. It wasn't easy to
debug. It's a really weird problem.
This is our line on the freshclam file:
OnUpdateExecute BASH_ENV=~clamav/.bashrc HOME=~clamav /some/script.sh | mail
[EMAIL PROTECTED] -s "ClamAV updated $HOSTNAME"
The OnError line was much easier:
OnErrorExecute tail /var/log/clamav/freshclam.log | mail [EMAIL PROTECTED] -s 
"ClamAV
Error $HOSTNAME"

Regards,

Samuel

_______________________________________________
http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-users

Reply via email to