From: ajacoutot Date: Tue, 17 May 2022 07:02:40 +0000 (+0000) Subject: Simplify unbound rc.d script. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=f1d3dddb05bf3705a5446cd4d6e233db4adec2e3;p=openbsd Simplify unbound rc.d script. input/ok sthen@ halex@ --- diff --git a/etc/rc.d/unbound b/etc/rc.d/unbound index a27a67032ca..977525ca75d 100644 --- a/etc/rc.d/unbound +++ b/etc/rc.d/unbound @@ -1,24 +1,18 @@ #!/bin/ksh # -# $OpenBSD: unbound,v 1.5 2018/01/11 21:09:26 rpe Exp $ +# $OpenBSD: unbound,v 1.6 2022/05/17 07:02:40 ajacoutot Exp $ daemon="/usr/sbin/unbound" daemon_flags="-c /var/unbound/etc/unbound.conf" . /etc/rc.d/rc.subr -pexp="unbound${daemon_flags:+ ${daemon_flags}}" - rc_pre() { if grep '^[[:space:]]*auto-trust-anchor-file:' \ /var/unbound/etc/unbound.conf > /dev/null 2>&1; then /usr/sbin/unbound-anchor -v || true fi -} - -rc_start() { - /usr/sbin/unbound-checkconf > /dev/null && - ${rcexec} "unbound ${daemon_flags}" + /usr/sbin/unbound-checkconf || return 1 } rc_cmd $1