The monit manual says that I can disable the implicit pid-change alert.
I want to do this for clamav, as this is restarted regularly by a cron
job (because it is a memory hog - restarting it releases memory).
I have this in my monit configuration:
check process clamd with pidfile /var/run/clamav/clamd.pid
group virus
start program = "/etc/init.d/clamd start"
stop program = "/etc/init.d/clamd stop"
if changed pid then exec "/bin/true"
if failed unixsocket /var/clamav/clamd.sock for 2 cycles then restart
if 5 restarts within 5 cycles then timeout
The crucial line being the one with 'exec "/bin/true"'.
However, it appears to have no effect - I still get e-mail alerts when
monit detects that the PID has changed. What am I doing wrong?
Thanks for your time,
David