aboutsummaryrefslogtreecommitdiff
path: root/net/frr5/files/watchfrr.in
blob: 253214c8bc8fe79d43fec8d24b4b9edd31bffc78 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh
#
# $FreeBSD$
#

# 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"

. /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 ripd ripngd ospfd ospf6d bgpd isisd eigrpd babeld"}

command=%%PREFIX%%/sbin/watchfrr
pidfile=/var/run/frr/watchfrr.pid

run_rc_command "$1"