summaryrefslogtreecommitdiff
path: root/net/babeld/files/babeld.in
blob: e1f078b7c035b653ac8252863f76891f32f50f0f (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

# PROVIDE: babeld dynamicrouting
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# babeld_enable (bool):   Set to NO by default.
#               Set it to YES to enable babeld.
# babeld_config (path):   Set to /usr/local/etc/babeld.conf
#               by default.
#

. /etc/rc.subr

name="babeld"
rcvar=babeld_enable

command=/usr/local/bin/${name}

load_rc_config $name

extra_commands="reload"

: ${babeld_enable="NO"}
: ${babeld_config="/usr/local/etc/babeld.conf"}

command_args="-D -I /var/run/${name}.pid $babeld_config"

run_rc_command "$1"