summaryrefslogtreecommitdiff
path: root/net/frr7/files/watchfrr.in
blob: f3a36434e7f6ff3c70e80758aa51a41f42a45213 (plain)
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
#!/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"