Hi all,
I've just got monit up and running on my fedora core 3 system. So far it
seems to be running just fine.
I wanted to make sure that monit won't start a service that's been
manually shutdown. Services that have been stopped manually/cleanly
would be missing their lockfile. So I added a dependency such that if
the lockfile is missing, the service should be unmonitored. such as this:
check process freshclam with pidfile /var/run/clamav/freshclam.pid
group freshclam
start program = "/etc/init.d/freshclam start"
stop program = "/etc/init.d/freshclam stop"
if 5 restarts within 5 cycles then timeout
depends on freshclam_lock
depends on clamd
check file freshclam_lock with path /var/lock/subsys/freshclam
group freshclam
if failed uid root then unmonitor
if failed gid root then unmonitor
but, it doesn't do what I expect.
Sorry about the n00b question, but what am I doing wrong? I'm assuming
that if the file is missing that the gid/uid check will fail- perhaps
there's a better way to do that too.