Lines 4-20
Link Here
|
4 |
# |
4 |
# |
5 |
# PROVIDE: chronyd |
5 |
# PROVIDE: chronyd |
6 |
# REQUIRE: DAEMON |
6 |
# REQUIRE: DAEMON |
|
|
7 |
# KEYWORD: nojail shutdown |
7 |
# |
8 |
# |
|
|
9 |
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf |
10 |
# to enable this service: |
11 |
# |
12 |
# chronyd_enable (bool): Set it to "YES" to enable chronyd |
13 |
# Default is "NO" |
14 |
# chronyd_config (str): Set full path to configuration file. |
15 |
# Default is "%%PREFIX%%/etc/chrony.conf" |
16 |
# chronyd_flags (str): Flags passed to chronyd(8) |
17 |
# Default is "" |
18 |
# |
8 |
|
19 |
|
9 |
. /etc/rc.subr |
20 |
. /etc/rc.subr |
10 |
|
21 |
|
11 |
name=chronyd |
22 |
name=chronyd |
12 |
rcvar=chronyd_enable |
23 |
rcvar=chronyd_enable |
13 |
command=%%PREFIX%%/sbin/${name} |
|
|
14 |
rc_flags="${chronyd_flags}" |
15 |
|
24 |
|
16 |
load_rc_config ${name} |
25 |
load_rc_config ${name} |
17 |
|
26 |
|
18 |
: ${chronyd_enable="NO"} |
27 |
: ${chronyd_enable:="NO"} |
|
|
28 |
: ${chronyd_config:="%%PREFIX%%/etc/chrony.conf"} |
19 |
|
29 |
|
|
|
30 |
command=%%PREFIX%%/sbin/${name} |
31 |
command_args="-f ${chronyd_config}" |
32 |
pidfile=/var/run/chrony/${name}.pid |
33 |
required_files=${chronyd_config} |
34 |
|
20 |
run_rc_command "$1" |
35 |
run_rc_command "$1" |