[bgpd] review 32-bit AS-path hotfix for 0.99.12
[jleu-quagga.git] / redhat / watchquagga.init
blob74299e37364dd14192114ce0e2aca8f584b55b36
1 #!/bin/bash
3 # chkconfig: 2345 17 83
4 # description: A Quagga watchdog for use with Zebra
6 # processname: watchquagga
8 # source function library
9 . /etc/rc.d/init.d/functions
11 # Get network config
12 . /etc/sysconfig/network
14 # quagga command line options
15 . /etc/sysconfig/quagga
17 # Check that networking is up.
18 [ "${NETWORKING}" = "no" ] && exit 0
20 # Check that there are daemons to be monitored.
21 [ -z "$WATCH_DAEMONS" ] && exit 0
23 RETVAL=0
24 prog="watchquagga"
26 case "$1" in
27 start)
28 echo -n $"Starting $prog: "
29 daemon /usr/sbin/watchquagga -d $WATCH_OPTS $WATCH_DAEMONS
30 RETVAL=$?
31 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/watchquagga
32 echo
34 stop)
35 echo -n $"Shutting down $prog: "
36 killproc watchquagga
37 RETVAL=$?
38 [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/watchquagga
39 echo
41 restart|reload)
42 $0 stop
43 $0 start
44 RETVAL=$?
46 condrestart)
47 if [ -f /var/lock/subsys/watchquagga ]; then
48 $0 stop
49 $0 start
51 RETVAL=$?
53 status)
54 status watchquagga
55 RETVAL=$?
58 echo $"Usage: $0 {start|stop|restart|reload|condrestart|status}"
59 exit 1
60 esac
62 exit $RETVAL