[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[monit] how best to start/stop via monit on Ubuntu hardy -- cf FAQ quest
From: |
Stan Kaufman |
Subject: |
[monit] how best to start/stop via monit on Ubuntu hardy -- cf FAQ question 7 |
Date: |
Tue, 16 Sep 2008 17:47:03 -0700 |
User-agent: |
Thunderbird 2.0.0.16 (Macintosh/20080707) |
Question 7 of the FAQ (http://tildeslash.com/monit/doc/faq.php) advises
starting critical services with monit by starting/stopping monit in
inittab or else by adding a line to monit's "rc script" (to stop these
services politely before monit stops). Ubuntu has abandoned inittab, and
the FAQ isn't precise as to how the suggested line:
/usr/local/bin/monit -c /etc/monitrc stop all
should be added -- or even precisely which file to add it to.
Should this be added to
/etc/monit/monitrc
? This seems unlikely, as there are no such system calls in this script.
Should this instead be added to
/etc/init.d/monit
? This seems more likely, but exactly where would this go? Something
like this, where the monit stop all call is right before the
start-stop-daemon call that stops monit?
---snip---
case "$1" in
start)
echo -n "Starting $DESC: "
monit_checks $1
echo -n "$NAME"
start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
--exec $DAEMON > /dev/null 2>&1 -- $ARGS
monit_delayed_monitoring
echo "."
;;
stop)
echo -n "Stopping $DESC: "
#monit_checks $1
echo -n "$NAME"
/usr/local/bin/monit -c /etc/monitrc stop all
start-stop-daemon --retry 5 --oknodo --stop --quiet --pidfile
/var/run/$NAME.pid \
--exec $DAEMON > /dev/null 2>&1
echo "."
;;
restart|force-reload)
$0 stop
$0 start
;;
syntax)
monit_check_syntax
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|restart|force-reload|syntax}" >&2
exit 1
;;
esac
---snip---
Something else? Many thanks in advance for definitive guidance here!
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [monit] how best to start/stop via monit on Ubuntu hardy -- cf FAQ question 7,
Stan Kaufman <=