summaryrefslogtreecommitdiff
path: root/net/bird/files/bird.in
blob: 8922eb3230b86cfe7f807fca34b78e4731e319cc (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: bird dynamicrouting
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# bird_enable (bool):   Set to NO by default.
#               Set it to YES to enable bird.
# bird_config (path):   Set to %%PREFIX%%/etc/bird.conf
#               by default.
#

. /etc/rc.subr

name="bird"
rcvar=bird_enable

command=%%PREFIX%%/sbin/${name}

load_rc_config $name

extra_commands="reload"

: ${bird_enable="NO"}
: ${bird_config="%%PREFIX%%/etc/bird.conf"}
: ${bird_group="birdvty"}

command_args="-P /var/run/${name}.pid -c $bird_config -g $bird_group"

run_rc_command "$1"