On Sunday 21 August 2005 03:09 pm, Stephen Gran wrote:

>
> Certainly the OP should run freshclam from a normal init script, if the
> idea is to start freshclam at boot.  OP: locate the init script that
> starts freshclam, and set your options that way, and then skip the cron
> job.  The init script method is the 'normal' way of doing things, and
> will be something that admins that come after you will quickly grok.
> Doing things in a non-standard way only raises the curve for others who
> have to follow you.

Gave up on the cronjob, I'll let freshclam start as per the init script. I did 
try adding the sleep to the init script, but, when placing it after 
${LOGFILE}, and running "service freshclam start" from the cli resulted in 
the process starting "Starting Clam AntiVirus Update Daemon:" but the 'ok' 
was not given.  My guess is because of the "sleep" variable. Tried after the 
"daemon /usr/bin/freshclam \" however that resulted in the config file not 
being found, lastly after --daemon which resulted in two freshclam processes 
running, one owned by clamav and the other by root.  I'll just leave the init 
script as it was for now unless someone sees a good place to put the "sleep" 
variable.  FWIW Stephen this is a simple home system running nothing but 
Mandriva Linux, not even networked to another computer.  I'm simply running 
clamav to see what virus's are making it through my ISP's virus blocker.

# See how we were called.
case "$1" in
  start)
        gprintf "Starting Clam AntiVirus Update Daemon: "
        touch ${LOGFILE}; chown ${USER}:${USER} ${LOGFILE}
        sleep $[ RANDOM % 3000 ]
        daemon /usr/bin/freshclam \
        --config-file=/etc/freshclam.conf \
        --quiet \
        --daemon
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/freshclam
        ;;
-- 
Chris
Registered Linux User 283774 http://counter.li.org
15:25:42 up 3:09, 1 user, load average: 0.29, 0.46, 0.37
Mandriva Linux 10.1 Official, kernel 2.6.8.1-12mdk
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nothing is ever as simple as it first seems
                -- Murphy's In Laws n°1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_______________________________________________
http://lurker.clamav.net/list/clamav-users.html

Reply via email to