> there is such an option in freshclam
> 
> [EMAIL PROTECTED]:~$ freshclam --help | grep RELOAD
>     --daemon-notify[=/path/clamav.conf] send RELOAD command to clamd
> 
> but it seems not to be working. all i know is that i had to restart
> clamd manually. only then it started to detect new viruses. so my
> question is: what is the status of that option? does it work?
> 
> imho 1h is way too long to wait for reload definitions in 
> busy server so
> i restart clamd every time new databases is downloaded.

For those who may be interested, here's a script I use every 3 hours on our Solaris 
systems (SPARC and x86) to run freshclam and refresh the daemon:

#!/usr/bin/ksh

# update_clam - script to get latest virus signatures and refresh clam daemon

DAT=`date "+%Y%m%d"`
# Take backup copies of the databases.  Note: it's worth having a clearout from time 
to time, else you'll
# swallow up disk space - eventually

cd /usr/local/share/clamav
for db in viruses.db viruses.db2
do
   cp ${db} ${db}.${DAT}
done

# Get the latest virus signatures by using su to run freshclam as CLAMAVUSER  (see 
ClamAV Makefile)
# In our case we have auser "exim" defined (as ClamAV is used in conjunction with Exim 
and Exiscan)

su - exim -c "/usr/local/bin/freshclam" >/tmp/clam-update.err 2>&1

# Check to see if the daemon is running.  If so, tell it to reload the databases.  If, 
for some
# reason the daemon isn't running, start it up

pid=`cat /usr/exim4/spool/clamd.pid`    # Change this to wherever clamd's PID is stored
if test "$pid"
then
# Force clamd to reload databases
   echo "RELOAD" | telnet localhost 3310
else
# clamd doesn't appear to be running, so re-start
   /etc/rc2.d/S87clamd start                    # Change this to whatever script is 
used to start clamd
fi


Paul Walsh


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Clamav-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/clamav-users

Reply via email to