xref: /openbsd/etc/rc.d/unbound (revision 35fe2a76)
1#!/bin/ksh
2#
3# $OpenBSD: unbound,v 1.9 2024/10/09 15:42:56 kn Exp $
4
5daemon="/usr/sbin/unbound"
6daemon_flags="-c /var/unbound/etc/unbound.conf"
7
8. /etc/rc.d/rc.subr
9
10rc_pre() {
11	local _anchor=$(/usr/sbin/unbound-checkconf -o auto-trust-anchor-file)
12
13	if [[ -n $_anchor && ! -f $_anchor ]]; then
14		/usr/sbin/unbound-anchor -v
15	fi
16
17	/usr/sbin/unbound-checkconf
18}
19
20rc_cmd $1
21