Dennis Peterson wrote
> Gary L Burnore wrote:
> > Once I dig through it all and figure it out, I'll post it here.
> >
> rrd-tools may be easier to set up and use.
Might be, but I got it....
Obviously, stopping the current clamd first...
Make the following changes in clamd.conf:
Comment out #LogFile
Comment out #LogTime
Uncomment LogSyslog yes
Uncomment MaxThreads
I'm trying 20 for now
Uncomment User
Set to qscand (or your user for clamav)
Uncomment Foreground yes
Uncomment ScanMail yes
cd to your supervise dir and make dirs:
mkdir -p qmail-clamav/log
in qmail-clamav/run:
#! /bin/sh
. /etc/profile # or however you'd want to set your paths and such
exec 2>&1
exec /usr/local/sbin/clamd
in qmail-clamav/log/run:
#! /bin/sh
exec /usr/local/bin/multilog t s1000000 n20 /var/log/clamd
Assuming you're running qmail, add the following to your qmailctl script:
(remove call to /etc/init.d/clamd if you have one)
Just after "start)"
if svok /service/qmail-clamd ; then
echo "Starting clamd"
svc -u /service/qmail-clamd /service/qmail-clamd/log
else
echo "qmail-clamd supervise not running"
fi
At the end of "stop)"
echo " qmail-clamd"
svc -d /service/qmail-clamd /service/qmail-clamd/log
pkill -9 clamd # optional to be sure...
At the end of "stat|status)"
svstat /service/qmail-clamd
svstat /service/qmail-clamd/log
Within "restart)", just before the line
echo "* Sending qmail-send SIGTERM and restarting."
Add the following:
echo "* Stopping clamd."
svc -d /service/qmail-clamd /service/qmail-clamd/log
sleep 5
echo "* Restarting qmail-clamd."
svc -u /service/qmail-clamd /service/qmail-clamd/log
Again, make sure there's not a current clamd running,
Symlink the qmail-clamd dir to your service dir.
It'll start running almost right away
mailctl status to see ...
420r:/var/log/qscand # qmailctl status
/service/qmail-send: up (pid 20890) 7 seconds
/service/qmail-send/log: up (pid 20891) 7 seconds
/service/qmail-smtpd: up (pid 20914) 7 seconds
/service/qmail-smtpd2: up (pid 20923) 7 seconds
/service/qmail-smtpd/log: up (pid 20915) 7 seconds
/service/qmail-smtpd2/log: up (pid 20924) 7 seconds
/service/qmail-pop3d: up (pid 20904) 7 seconds
/service/qmail-pop3d2: up (pid 20909) 7 seconds
/service/qmail-pop3d/log: up (pid 20905) 7 seconds
/service/qmail-pop3d2/log: up (pid 20910) 7 seconds
/service/qmail-spamd: up (pid 20884) 8 seconds
/service/qmail-spamd/log: up (pid 20885) 8 seconds
/service/qmail-clamd: up (pid 20879) 8 seconds
/service/qmail-clamd/log: up (pid 20881) 8 seconds
messages in queue: 173
messages in queue but not yet preprocessed: 0
Now you're running with multilog so the mrtg will work. :)
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml