aboutsummaryrefslogtreecommitdiffstats
path: root/main/unbound/unbound.initd
diff options
context:
space:
mode:
Diffstat (limited to 'main/unbound/unbound.initd')
-rw-r--r--main/unbound/unbound.initd15
1 files changed, 5 insertions, 10 deletions
diff --git a/main/unbound/unbound.initd b/main/unbound/unbound.initd
index 68421f9c136..9fba36cff7d 100644
--- a/main/unbound/unbound.initd
+++ b/main/unbound/unbound.initd
@@ -1,4 +1,5 @@
#!/sbin/openrc-run
+supervisor=supervise-daemon
extra_commands="checkconfig configtest"
extra_started_commands="reload"
@@ -11,10 +12,9 @@ description_reload="Kills all children and reloads the configuration."
# Upper case variables are here only for backward compatibility.
: ${cfgfile:=${UNBOUND_CONFFILE:-/etc/unbound/$RC_SVCNAME.conf}}
-command="/usr/sbin/unbound"
-command_args="-d $command_args"
-command_background=yes
-pidfile="/run/$RC_SVCNAME.pid"
+command=/usr/sbin/unbound
+command_args="$command_args"
+command_args_foreground="-d"
required_files="$cfgfile"
@@ -31,11 +31,6 @@ checkconfig() {
eend $?
}
-configtest() {
- ewarn "This command is deprecated, use checkconfig instead"
- checkconfig
-}
-
start_pre() {
checkconfig
}
@@ -44,6 +39,6 @@ reload() {
start_pre || return $?
ebegin "Reloading $name"
- start-stop-daemon --signal HUP --pidfile "$pidfile"
+ $supervisor "$RC_SVCNAME" --signal HUP
eend $?
}