1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-19 00:13:33 +00:00
freebsd-ports/net/frr8/files/watchfrr.in
Olivier Cochard 04630d1707 net/frr8: New major version 8.2.2 of FRRouting
PR:		260950
Obtained from:	Bug fixes by hrs, improved by bijanebrahimi@riseup.net
2022-07-07 14:12:50 +02:00

31 lines
985 B
Bash

#!/bin/sh
# PROVIDE: watchfrr
# REQUIRE: NETWORKING frr
# KEYWORD: nojailvtnet shutdown
# Add the following line to /etc/rc.conf to enable watchfrr:
# watchfrr_enable="YES"
#
# You may also wish to use the following variables to fine-tune startup:
# watchfrr_flags
# Example of flags usage:
# watchfrr_flags=" -d -r /usr/sbin/servicebBfrrbBrestartbB%s -s /usr/sbin/servicebBfrrbBstartbB%s -k /usr/sbin/servicebBfrrbBstopbB%s -b bB -t 30 zebra ripd ripngd ospfd ospf6d bgpd isisd eigrpd babeld bfdd staticd"
. /etc/rc.subr
name=watchfrr
rcvar=${name}_enable
load_rc_config $name
stop_postcmd="rm -f $pidfile"
watchfrr_enable=${watchfrr_enable:-"NO"}
watchfrr_flags=${watchfrr_flags:-"-d -r /usr/sbin/servicebBfrrbBrestartbB%s -s /usr/sbin/servicebBfrrbBstartbB%s -k /usr/sbin/servicebBfrrbBstopbB%s -b bB -t 30 zebra babeld bfdd bgpd eigrpd fabricd isisd ospfd ospf6d ripd ripngd staticd"}
command=%%PREFIX%%/sbin/watchfrr
pidfile=/var/run/frr/watchfrr.pid
run_rc_command "$1"