mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-14 08:34:39 +00:00
unbound: fix deadlock by specifying a pidfile to daemon
This commit is contained in:
parent
f60333622a
commit
cb510320fa
@ -179,7 +179,7 @@ class DNSReader:
|
||||
return True
|
||||
|
||||
def run_logger(self):
|
||||
# override the Daemonize signal handler
|
||||
# set a signal handler
|
||||
signal.signal(signal.SIGINT, self._sig)
|
||||
signal.signal(signal.SIGTERM, self._sig)
|
||||
|
||||
@ -213,7 +213,6 @@ def run(pipe, flush_interval):
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('--pid', help='pid file location', default='/var/run/unbound_logger.pid')
|
||||
parser.add_argument('--pipe', help='named pipe file location', default='/var/unbound/data/dns_logger')
|
||||
parser.add_argument('--flush_interval', help='interval to flush to db', default=10)
|
||||
|
||||
|
||||
@ -71,5 +71,6 @@ if [ -n "${DOMAIN}" ]; then
|
||||
fi
|
||||
|
||||
if [ -f /var/unbound/data/stats ]; then
|
||||
/usr/sbin/daemon -f -S -m 2 -s err -l local4 -T unbound /usr/local/opnsense/scripts/unbound/logger.py
|
||||
/usr/sbin/daemon -p /var/run/unbound_logger.pid -f -S -m 2 -s err -l local4 \
|
||||
-T unbound /usr/local/opnsense/scripts/unbound/logger.py
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user