From 0345976a630d32285bdf5ce9d12b5766ca925a31 Mon Sep 17 00:00:00 2001 From: sthen Date: Mon, 9 Jan 2012 11:55:10 +0000 Subject: [PATCH] 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@ --- net/unbound/Makefile | 4 ++-- net/unbound/pkg/unbound.rc | 20 ++++++++++++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/net/unbound/Makefile b/net/unbound/Makefile index f5afb2e48e5..d547fb32021 100644 --- a/net/unbound/Makefile +++ b/net/unbound/Makefile @@ -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/ diff --git a/net/unbound/pkg/unbound.rc b/net/unbound/pkg/unbound.rc index c06000ecd19..6982e1962ba 100644 --- a/net/unbound/pkg/unbound.rc +++ b/net/unbound/pkg/unbound.rc @@ -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