diff options
author | root <root@rshg054.dnsready.net> | 2011-12-13 23:14:49 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2011-12-13 23:14:49 +0000 |
commit | f4dcb5cb43b68e265512a03a160bdda634818b43 (patch) | |
tree | 9000841b67cefbce37255cb4d728e80bd5a11586 /community/quagga/quagga.rc | |
parent | cb9c375209c236c16557878a1b864f91de27b88d (diff) |
Tue Dec 13 23:14:49 UTC 2011
Diffstat (limited to 'community/quagga/quagga.rc')
-rw-r--r-- | community/quagga/quagga.rc | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/community/quagga/quagga.rc b/community/quagga/quagga.rc new file mode 100644 index 000000000..f938c6f8a --- /dev/null +++ b/community/quagga/quagga.rc @@ -0,0 +1,34 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions +. /etc/conf.d/${0##*/} + +NAME=${0##*/} +DAEMON=/usr/sbin/$NAME +PID=$(pidof -o %PPID $DAEMON) + +case "$1" in + start) + stat_busy "Starting Quagga $NAME daemon" + [[ ! $PID ]] && $DAEMON $DAEMON_OPTS && add_daemon $NAME && stat_done && exit 0 + stat_fail + ;; + stop) + stat_busy "Stopping $NAME daemon" + [[ $PID ]] && kill $PID &> /dev/null && rm_daemon $NAME && stat_done && exit 0 + stat_fail + ;; + restart) + $0 stop + $0 start + exit 0 + ;; + *) + echo "usage: ${0##*/} {start|stop|restart}" >&2 + ;; +esac + +exit 1 + +# vim:set ts=2 sw=2 ft=sh noet: |