blob: 03f11f4ab8a1e0a544d397feb4baf9511bb4f2c4 (
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
36
37
|
#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: unbound.sh,v 1.5 2015/12/28 13:48:30 bsiegert Exp $
#
# PROVIDE: unbound
# REQUIRE: DAEMON
#
. /etc/rc.subr
name="unbound"
rcvar=${name}
command=@PREFIX@/sbin/${name}
pidfile=/var/run/${name}/${name}.pid
required_files="@PKG_SYSCONFDIR@/unbound.conf"
extra_commands="reload"
start_precmd="unbound_precmd"
unbound_precmd()
{
if [ ! -d @VARBASE@/run/unbound ]; then
@MKDIR@ @VARBASE@/run/unbound
@CHMOD@ 0750 @VARBASE@/run/unbound
@CHOWN@ @UNBOUND_USER@:@UNBOUND_GROUP@ @VARBASE@/run/unbound
fi
}
unbound_flags=${unbound_flags:-""}
if [ -f /etc/rc.subr ]; then
load_rc_config ${name}
run_rc_command "$1"
else
echo -n " ${name}"
${command} ${unbound_flags}
fi
|