3 # monit Monitoring daemon
6 # description: Monitoring daemon
9 # Source function library
10 . /etc/rc.d/init.d/functions
13 [ -f /etc/sysconfig/monit ] && . /etc/sysconfig/monit
16 # See how we were called.
19 # Check if the service is already running?
20 if [ ! -f /var/lock/subsys/monit ]; then
22 daemon monit -c /etc/monitrc -l syslog -d 60
24 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/monit
26 msg_already_running monit
31 if [ -f /var/lock/subsys/monit ]; then
33 daemon monit -c /etc/monitrc quit
34 rm -f /var/lock/subsys/monit > /dev/null 2>&1
41 monit -c /etc/monitrc status
50 if [ -f /var/lock/subsys/monit ]; then
52 daemon monit -c /etc/monitrc reload
60 msg_usage "$0 {start|stop|restart|reload|force-reload|status}"