mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-29 13:00:32 +01:00
fb18e34a07
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
40 lines
667 B
Bash
40 lines
667 B
Bash
#!/bin/sh
|
|
|
|
start() {
|
|
if [ -x /usr/sbin/watchquagga ]; then
|
|
|
|
for i in zebra bgpd isisd ospfd ospf6d pimd ripd ripngd nhrpd; do
|
|
if [ -e /var/run/quagga/$i.pid ] ; then
|
|
WATCHSERVICES="${WATCHSERVICES} ${i}"
|
|
fi
|
|
done
|
|
|
|
echo -n "Starting watchquagga: "
|
|
/usr/sbin/watchquagga -dz -R '/etc/rc.d/rc.quagga restart' $WATCHSERVICES || exit 1
|
|
echo "done"
|
|
fi
|
|
}
|
|
|
|
stop() {
|
|
echo -n "Stopping watchquagga: "
|
|
killall watchquagga 2>/dev/null && echo -n "done" || echo -n "not started"
|
|
echo
|
|
}
|
|
|
|
restart() {
|
|
stop && sleep 2s && start
|
|
}
|
|
|
|
case "$1" in
|
|
'start')
|
|
start
|
|
;;
|
|
'stop')
|
|
stop
|
|
;;
|
|
'restart')
|
|
restart
|
|
;;
|
|
*)
|
|
echo "usage $0 start|stop|restart"
|
|
esac
|