openbsd-ports/net/unbound/pkg/unbound.rc
sthen 0345976a63 Adjust unbound.rc to use unbound-control to stop/start/check Unbound.
Previously if unbound-control was used to restart the daemon, further
use of /etc/rc.d/unbound would no longer match the process title.
Reported by camield@, ok aja@ jakob@
2012-01-09 11:55:10 +00:00

26 lines
418 B
Bash

#!/bin/sh
#
# $OpenBSD: unbound.rc,v 1.2 2012/01/09 11:55:10 sthen Exp $
daemon="${TRUEPREFIX}/sbin/unbound-control"
daemon_flags="-c /var/unbound/etc/unbound.conf"
. /etc/rc.d/rc.subr
pexp="unbound${daemon_flags:+ ${daemon_flags}}"
rc_reload=NO
rc_start() {
${rcexec} "${daemon} ${daemon_flags} start"
}
rc_check() {
${daemon} ${daemon_flags} status
}
rc_stop() {
${daemon} ${daemon_flags} stop
}
rc_cmd $1