diff options
author | Martin Winter <mwinter@opensourcerouting.org> | 2017-01-06 17:45:13 +0100 |
---|---|---|
committer | Martin Winter <mwinter@opensourcerouting.org> | 2017-01-06 17:45:13 +0100 |
commit | c115e4a4b49cdc03d9e8090db0cff548868e0538 (patch) | |
tree | a8672923710d6ae131a8817aa2bf289c4fe49002 /redhat/watchfrr.init | |
parent | Merge pull request #41 from donaldsharp/quagga_to_frr (diff) | |
download | frr-c115e4a4b49cdc03d9e8090db0cff548868e0538.tar.xz frr-c115e4a4b49cdc03d9e8090db0cff548868e0538.zip |
redhat: rename project from Quagga to FRR
Rename all instances of Quagga to FRR in red hat package files
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Diffstat (limited to 'redhat/watchfrr.init')
-rw-r--r-- | redhat/watchfrr.init | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/redhat/watchfrr.init b/redhat/watchfrr.init new file mode 100644 index 000000000..bc8341516 --- /dev/null +++ b/redhat/watchfrr.init @@ -0,0 +1,66 @@ +#!/bin/bash +# chkconfig: 2345 17 83 + +### BEGIN INIT INFO +# Provides: watchfrr +# Short-Description: Frr watchdog +# Description: Frr watchdog for use with Zebra +### END INIT INFO + +# source function library +. /etc/rc.d/init.d/functions + +# Get network config +. /etc/sysconfig/network + +# frr command line options +. /etc/sysconfig/frr + +RETVAL=0 +PROG="watchfrr" +cmd=watchfrr +LOCK_FILE=/var/lock/subsys/watchfrr + +case "$1" in + start) + # Check that networking is up. + [ "${NETWORKING}" = "no" ] && exit 1 + + # Check that there are daemons to be monitored. + [ -z "$WATCH_DAEMONS" ] && exit 1 + + echo -n $"Starting $PROG: " + daemon $cmd -d $WATCH_OPTS $WATCH_DAEMONS + RETVAL=$? + [ $RETVAL -eq 0 ] && touch $LOCK_FILE + echo + ;; + stop) + echo -n $"Shutting down $PROG: " + killproc $cmd + RETVAL=$? + [ $RETVAL -eq 0 ] && rm -f $LOCK_FILE + echo + ;; + restart|reload|force-reload) + $0 stop + $0 start + RETVAL=$? + ;; + condrestart|try-restart) + if [ -f $LOCK_FILE ]; then + $0 stop + $0 start + fi + RETVAL=$? + ;; + status) + status $cmd + RETVAL=$? + ;; + *) + echo $"Usage: $0 {start|stop|restart|reload|force-reload|condrestart|try-restart|status}" + exit 2 +esac + +exit $RETVAL |