On Tue, 7 Jun 2005, Ronny Nussbaum wrote:
> In the documentation, it says that clamd accepts commands such as PING,
> VERSION, etc.
> Every time I start clamd, it just starts the daemon in the background.
> If I do "clamd PING", I get a daemon named....clamd PING.
You send these commands to the daemon over the socket, think of it as
'telneting' to the daemon and typeing the command. Here is a simple program
I use to reload my databases (I run freshclam on one machine and rsync to
all others)
#!/usr/local/bin/perl
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);
==========================================================
Chris Candreva -- [EMAIL PROTECTED] -- (914) 967-7816
WestNet Internet Services of Westchester
http://www.westnet.com/
_______________________________________________
http://lurker.clamav.net/list/clamav-users.html