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@
This commit is contained in:
sthen 2012-01-09 11:55:10 +00:00
parent c0aa7effe3
commit 0345976a63
2 changed files with 20 additions and 4 deletions

View File

@ -1,9 +1,9 @@
# $OpenBSD: Makefile,v 1.35 2012/01/04 21:41:45 sthen Exp $
# $OpenBSD: Makefile,v 1.36 2012/01/09 11:55:10 sthen Exp $
COMMENT= validating DNS resolver
DISTNAME= unbound-1.4.14
REVISION= 0
REVISION= 1
CATEGORIES= net
MASTER_SITES= http://www.unbound.net/downloads/

View File

@ -1,9 +1,25 @@
#!/bin/sh
#
# $OpenBSD: unbound.rc,v 1.1 2011/03/06 09:24:41 jakob Exp $
# $OpenBSD: unbound.rc,v 1.2 2012/01/09 11:55:10 sthen Exp $
daemon="${TRUEPREFIX}/sbin/unbound"
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