Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Apr 2022 12:34:45 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 262844] Not recorded in syslog unless local-unbound is restarted
Message-ID:  <bug-262844-227-5hYn80fv4L@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-262844-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-262844-227@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=3D262844

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

-- /etc/rc.d/local_unbound_syslog --
#!/bin/sh

# PROVIDE: local_unbound_syslog
# REQUIRE: local_unbound syslogd

. /etc/rc.subr

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

load_rc_config "local_unbound"

: ${local_unbound_enable:=3D"NO"}
: ${local_unbound_workdir:=3D/var/unbound}
: ${local_unbound_config:=3D${local_unbound_workdir}/unbound.conf}

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

local_unbound_syslog_start()
{
        if checkyesno local_unbound_enable; then
                usesyslog=3D`${checkconf} -o use-syslog ${local_unbound_con=
fig}`
                if checkyesno usesyslog; then
                        echo local_unbound restarts to use syslog
                        /usr/sbin/service local_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-262844-227-5hYn80fv4L>