mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-26 19:00:34 +02:00
frr: Add initscript
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
54
src/initscripts/packages/frr
Executable file
54
src/initscripts/packages/frr
Executable file
@@ -0,0 +1,54 @@
|
||||
#!/bin/sh
|
||||
########################################################################
|
||||
# Begin $rc_base/init.d/frr
|
||||
#
|
||||
# Description : FRRouting Suite
|
||||
#
|
||||
########################################################################
|
||||
|
||||
. /etc/sysconfig/rc
|
||||
. ${rc_functions}
|
||||
|
||||
DAEMONS="zebra bgpd ospfd staticd"
|
||||
|
||||
case "${1}" in
|
||||
start)
|
||||
for daemon in ${DAEMONS}; do
|
||||
if [ -f "/etc/frr/${daemon}.conf" ]; then
|
||||
boot_mesg "Starting FRRouting ${daemon}..."
|
||||
loadproc "/usr/sbin/${daemon}" --daemon
|
||||
fi
|
||||
done
|
||||
;;
|
||||
|
||||
stop)
|
||||
for daemon in ${DAEMONS}; do
|
||||
boot_mesg "Stopping FRRouting ${daemon}..."
|
||||
killproc "/usr/sbin/${daemon}"
|
||||
done
|
||||
;;
|
||||
|
||||
reload)
|
||||
boot_mesg "Reloading FRRouting..."
|
||||
reloadproc /usr/sbin/frr-reload
|
||||
;;
|
||||
|
||||
restart)
|
||||
${0} stop
|
||||
sleep 1
|
||||
${0} start
|
||||
;;
|
||||
|
||||
status)
|
||||
for daemon in ${DAEMONS}; do
|
||||
statusproc "/usr/sbin/${daemon}"
|
||||
done
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: ${0} {start|stop|reload|restart|status}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# End $rc_base/init.d/frr
|
||||
Reference in New Issue
Block a user