Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Apr 2022 12:35:52 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 262995] dns/unbound: Not recorded in syslogd
Message-ID:  <bug-262995-7788-PY7r1dCFKF@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-262995-7788@https.bugs.freebsd.org/bugzilla/>
References:  <bug-262995-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D262995

--- Comment #5 from vfx9as@gmail.com ---
The following script could handle it

-- /usr/local/etc/rc.d/unbound_syslog --
#!/bin/sh

# PROVIDE: unbound_syslog
# REQUIRE: unbound syslogd

. /etc/rc.subr

name=3D"unbound_syslog"
desc=3D"unbound to use syslog"
start_cmd=3D"${name}_start"
stop_cmd=3D":"

load_rc_config "unbound"

: ${unbound_enable:=3D"NO"}
: ${unbound_config:=3D/usr/local/etc/unbound/unbound.conf}

checkconf=3D"/usr/local/sbin/unbound-checkconf"

unbound_syslog_start()
{
        if checkyesno unbound_enable; then
                usesyslog=3D`${checkconf} -o use-syslog ${unbound_config}`
                if checkyesno usesyslog; then
                        echo unbound restarts to use syslog
                        /usr/sbin/service unbound restart
                fi
        fi
}

run_rc_command "$1"

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-262995-7788-PY7r1dCFKF>