> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of C. Bensend > Sent: Wednesday, December 15, 2004 10:31 AM > To: [EMAIL PROTECTED] > Subject: [Clamav-users] How does freshclam execute OnUpdateExecute > program? > > > > Hey folks, > > I'm working on a new server, and things are running beautifully. I > did, however, notice something I thought was a little odd... > > I wrote a pair of shell scripts that will email me an alert when > freshclam updates the database successfully, and also if it fails. I > tested, and it worked perfectly. > > ... Until I set the user (_qscand) that clamd/freshclam run as to > have a restricted (/sbin/nologin) shell, that is. Then, I didn't get > any further alerts. Just to make sure I wasn't smoking the bad crack, > I changed the shell back to bash, and I got alerts again. > > How does freshclam actually execute this command? Is there a way > around this? I'd rather run that user without a real shell if possible. > If not, no huge deal, but it would be nice. >
This is the way I do it: OnUpdateExecute BASH_ENV=~clamav/.bashrc HOME=~clamav /usr/local/bin/propagate_bd_clamav.sh | mail [EMAIL PROTECTED] -s "Freshclam update $HOSTNAME" OnErrorExecute tail /var/log/clamav/freshclam.log | mail [EMAIL PROTECTED] -s "Freshclam error $HOSTNAME" propagate_bd_clamav.sh is a /bin/bash script that propagates the cvds to other servers via sftp. that way they don't have to download it again. it prints out its results to stdout, so it gets delivered by mail to [EMAIL PROTECTED] User clamav doesn't have a valid shell and I had to add the env variables to make it work. Regards, -Samuel _______________________________________________ http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-users