blob: 1aa44de36514b37ef6aa3b5c954fceb212e52997 (
plain)
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
35
|
#!/bin/sh
# PROVIDE: kresd
# REQUIRE: NETWORKING
# BEFORE: SERVERS
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable knot-resolver:
#
# kresd_enable="YES": Set to YES to enable kresd.
# Set to NO by default.
# kresd_config="": Set to %%ETCDIR%%/kresd.conf
# by default.
#
. /etc/rc.subr
name=kresd
rcvar=kresd_enable
load_rc_config ${name}
# set defaults
kresd_enable=${kresd_enable:-"NO"}
kresd_config=${kresd_config:-"%%ETCDIR%%/${name}.conf"}
pidfile="%%RUNDIR%%/${name}.pid"
procname="%%PREFIX%%/sbin/${name}"
required_files="${kresd_config}"
command="/usr/sbin/daemon"
command_args="-c -f -S -r -P ${pidfile} -- ${procname} -c ${kresd_config} -n -q %%RUNDIR%%"
run_rc_command "$1"
|