summaryrefslogtreecommitdiff
path: root/net/chrony/files/chronyd.in
blob: 92a2542c5fd04507157d7956aae0785599bdf28d (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
#
# $FreeBSD$
#
# PROVIDE: chronyd
# REQUIRE: DAEMON
# KEYWORD: nojail shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# chronyd_enable (bool):	Set it to "YES" to enable chronyd
#				Default is "NO"
# chronyd_config (str):		Set full path to configuration file.
#				Default is "%%PREFIX%%/etc/chrony.conf"
# chronyd_flags (str):		Flags passed to chronyd(8)
#				Default is ""
#

. /etc/rc.subr

name=chronyd
rcvar=chronyd_enable

load_rc_config ${name}

: ${chronyd_enable:="NO"}
: ${chronyd_config:="%%PREFIX%%/etc/chrony.conf"}

command=%%PREFIX%%/sbin/${name}
command_args="-f \"${chronyd_config}\""
required_files="${chronyd_config}"

run_rc_command "$1"