| # Required-Start: $local_fs $network $remote_fs $syslog |
| # Required-Stop: $local_fs $network $remote_fs $syslog |
| # Short-Description: start and stop the Quagga watchdog |
| PATH=/bin:/usr/bin:/sbin:/usr/sbin |
| test -f /etc/default/watchquagga && . /etc/default/watchquagga |
| # Check that there are daemons to be monitored. |
| [ -z "$watch_daemons" ] && exit 0 |
| pidfile="/var/run/quagga/watchquagga.pid" |
| echo -n "Starting quagga watchdog daemon: watchquagga" |
| start-stop-daemon --start \ |
| --exec /usr/sbin/watchquagga \ |
| -- -d $watch_options $watch_daemons |
| echo -n "Stopping quagga watchdog daemon: watchquagga" |
| start-stop-daemon --stop --quiet \ |
| [ -e $pidfile ] && kill -0 `cat $pidfile` 2> /dev/null |
| echo "(pid `cat $pidfile`) is running..." |
| echo "Usage: /etc/init.d/watchquagga {start|stop|restart|force-reload}" |