2007-12-10 21:29:47 +01:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# /etc/rc.d/monitd: start/stop monit daemon
|
|
|
|
#
|
|
|
|
|
2009-04-16 06:54:06 +00:00
|
|
|
CONFIG=/etc/monitrc
|
2007-12-10 21:29:47 +01:00
|
|
|
|
|
|
|
case $1 in
|
|
|
|
start)
|
2008-05-15 00:22:49 +02:00
|
|
|
/usr/bin/monit -c $CONFIG
|
|
|
|
;;
|
2007-12-10 21:29:47 +01:00
|
|
|
stop)
|
2008-05-15 00:22:49 +02:00
|
|
|
/usr/bin/killall -q /usr/bin/monit
|
2007-12-10 21:29:47 +01:00
|
|
|
;;
|
|
|
|
reload)
|
2008-05-15 00:22:49 +02:00
|
|
|
/usr/bin/monit -c $CONFIG reload
|
2007-12-10 21:29:47 +01:00
|
|
|
;;
|
|
|
|
restart)
|
|
|
|
$0 stop
|
|
|
|
sleep 1
|
|
|
|
$0 start
|
2008-05-15 00:22:49 +02:00
|
|
|
;;
|
2007-12-10 21:29:47 +01:00
|
|
|
*)
|
2008-05-15 00:22:49 +02:00
|
|
|
echo "usage: $0 [start|stop|reload|restart]"
|
|
|
|
;;
|
2007-12-10 21:29:47 +01:00
|
|
|
esac
|
|
|
|
|
|
|
|
# End of File
|