blob: 3dcf37f8cf316c17387d468534b58994bba50262 (
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
34
|
#!/bin/sh
# PROVIDE: bird dynamicrouting
# REQUIRE: DAEMON
# 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
load_rc_config $name
: ${bird_enable="NO"}
: ${bird_config="%%PREFIX%%/etc/bird.conf"}
: ${bird_group="birdvty"}
command=%%PREFIX%%/sbin/${name}
command_args="-c $bird_config -g $bird_group"
extra_commands="gracefulrestart" # It is not a restart but a stop
gracefulrestart_cmd="%%PREFIX%%/sbin/${name}c graceful restart"
run_rc_command "$1"
|