On Tue, 17 Aug 2004, Mitch (WebCob) wrote:
> Does the clamd process need to be signaled on each machine to recognize the
> new db?
Yes. Here are the pieces - there are probably simpler ways to do most of
this now.
The cron job:
/usr/local/bin/freshclam --daemon-notify --log=/var/adm/clam-update.log \
--on-update-execute=/usr/local/share/clamav/ClamPush.sh \
--quiet
(and yes, on-update-execute can go in the config file now) :)
ClamPush.sh does:
$RSYNC -avzr --rsh=$SSH $CLAMDIR/*.cvd OtherHost:$CLAMDIR
$SSH OtherHost /usr/local/sbin/clamd-reload.pl
Since freshclam runs as user clamav, the rsync/ssh is done as user clamav.
Set up permissions accordingly and distribute proper ssh keys.
clamd-reload.pl is simply:
#!/usr/local/bin/perl
our $clamd = '/etc/init.d/clamd';
use IO::Socket::UNIX;
$sock = IO::Socket::UNIX->new(Peer => "/var/clamav/clamav.sock",
Type => SOCK_STREAM,
Timeout => 10)
|| &RestartClamd ;
$sock->send("RELOAD") ;
$sock->recv($mesg, 1024) ;
print $mesg,"\n";
exit (0);
Uh, ok -- maybe it's not all that simple. :-)
==========================================================
Chris Candreva -- [EMAIL PROTECTED] -- (914) 967-7816
WestNet Internet Services of Westchester
http://www.westnet.com/
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Clamav-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/clamav-users