All pastes #455757 Raw Edit

w0ls0n

public text v1 · immutable
#455757 ·published 2007-04-24 13:11 UTC
rendered paste body
Hello,

Gavin from the list sent me an updated version of clamav only to run
it via daemontools. I would appreciate any responses. If you want to
change the way your current system runs from the default script to
daemontools, just stop clamav before you create the symlinks and also
take freshclam out of cron as it is no longer needed. You can
obviously skip the clamav install if its already installed :-)

Here is the doc. I should be able to test this early or late next week
and then add it to the guide. Works fine on my production box so far
....

Thanks to Gavin and Phil on this :-)

Installing clamav

       # cd /usr/ports/security/clamav
       # make install clean

               Milter | LDAP | Curl | STDERR | EXPERIMENTAL -> all left unselected

       # mkdir -m 1755 /var/qmail/supervise/clamav
       # mkdir -m 1755 /var/qmail/supervise/freshclam
       # mkdir -m 755 /var/qmail/supervise/clamav/log
       # mkdir -m 755 /var/qmail/supervise/freshclam/log
       # cd /var/qmail/supervise/clamav
       # fetch http://freebsdrocks.net/files/clamav-run
       # mv clamav-run run
       # chmod 755 run
       # cd log
       # fetch http://freebsdrocks.net/files/log-run
       # mv log-run run
       # chmod 755 run
       # cd /var/qmail/supervise/freshclam
       # fetch http://freebsdrocks.net/files/freshclam-run
       # mv freshclam-run run
       # chmod 755 run
       # cd log
       # fetch http://freebsdrocks.net/files/log-run
       # mv log-run run
       # chmod 755 run
       # vi /usr/local/etc/clamd.conf

               #Example - must be commented out or removed
               #LogFile - multilog will handle logging
               #LogSysLog no - see LogFile
               FixStaleSocket yes - optional
               Foreground yes - required to run clamav via daemontools

       # vi /usr/local/etc/freshclam.conf

               #Example
               #UpdateLogFile - multilog will handle logging
               # LogSyslog no - see UpdateLogFile
               Foreground yes - required to run freshclam via daemontools

       Now to create the symlinks to the service

       # ln -s /var/qmail/supervise/clamav /service/
       # ln -s /var/qmail/supervise/freshclam /service/

       Check to see if clamav and freshclam are running

       # svstat /service/clamav /service/clamav/log

       /service/clamav: up (pid 82396) 63 seconds
       /service/clamav/log: up (pid 82446) 25 seconds

       # svstat /service/freshclam/ /service/freshclam/log

       /service/freshclam/: up (pid 82409) 69 seconds
       /service/freshclam/log: up (pid 82410) 69 seconds

       Now to remove the startup scripts:

       # rm /usr/local/etc/rc.d/clamav-clamd
       # rm /usr/local/etc/rc.d/clamav-freshclam