summaryrefslogtreecommitdiff
path: root/init/redhat/ospfd.init
diff options
context:
space:
mode:
Diffstat (limited to 'init/redhat/ospfd.init')
-rw-r--r--init/redhat/ospfd.init45
1 files changed, 45 insertions, 0 deletions
diff --git a/init/redhat/ospfd.init b/init/redhat/ospfd.init
new file mode 100644
index 00000000..d7453b6e
--- /dev/null
+++ b/init/redhat/ospfd.init
@@ -0,0 +1,45 @@
+#!/bin/bash
+#
+# chkconfig: - 16 84
+# description: An OSPF v2 routing engine for use with Zebra
+#
+# processname: ospfd
+# config: /etc/ospfd.conf
+
+# source function library
+. /etc/rc.d/init.d/functions
+
+RETVAL=0
+
+[ -f /etc/ospfd.conf ] || exit 0
+
+case "$1" in
+ start)
+ echo -n "Starting ospfd: "
+ daemon /usr/sbin/ospfd -d
+ RETVAL=$?
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/ospfd
+ echo
+ ;;
+ stop)
+ echo -n "Shutting down ospfd: "
+ killproc ospfd
+ RETVAL=$?
+ [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/ospfd
+ echo
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ RETVAL=$?
+ ;;
+ status)
+ status ospfd
+ RETVAL=$?
+ ;;
+ *)
+ echo "Usage: ospfd {start|stop|restart|status}"
+ exit 1
+esac
+
+exit $RETVAL