From d3f809bf4932bdaa241aa7726ca755d64860c81c Mon Sep 17 00:00:00 2001 From: Pieter Lexis Date: Tue, 22 Dec 2015 15:47:43 +0100 Subject: [PATCH] Run pdns_recursor on the foreground by default Closes #3079 --- build-scripts/debian-recursor/pdns-recursor.init | 2 +- docs/markdown/recursor/settings.md | 2 +- pdns/pdns_recursor.cc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build-scripts/debian-recursor/pdns-recursor.init b/build-scripts/debian-recursor/pdns-recursor.init index 206bf65c6..5ab22c201 100644 --- a/build-scripts/debian-recursor/pdns-recursor.init +++ b/build-scripts/debian-recursor/pdns-recursor.init @@ -43,7 +43,7 @@ start() { # 0 if daemon has been started / was already running # >0 if daemon could not be started start-stop-daemon --start --oknodo --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null || return 0 - start-stop-daemon --start --oknodo --quiet --pidfile $PIDFILE --exec $DAEMON || return 2 + start-stop-daemon --start --oknodo --quiet --pidfile $PIDFILE --exec $DAEMON -- --daemon=yes || return 2 } start_resolvconf() { diff --git a/docs/markdown/recursor/settings.md b/docs/markdown/recursor/settings.md index cb0e01564..d2fad962d 100644 --- a/docs/markdown/recursor/settings.md +++ b/docs/markdown/recursor/settings.md @@ -144,7 +144,7 @@ When running multiple recursors on the same server, read settings from ## `daemon` * Boolean -* Default: yes +* Default: no (since 4.0.0, 'yes' before 4.0.0) Operate in the background. diff --git a/pdns/pdns_recursor.cc b/pdns/pdns_recursor.cc index 67163aeb3..87f147273 100644 --- a/pdns/pdns_recursor.cc +++ b/pdns/pdns_recursor.cc @@ -2550,7 +2550,7 @@ int main(int argc, char **argv) ::arg().setSwitch("non-local-bind", "Enable binding to non-local addresses by using FREEBIND / BINDANY socket options")="no"; ::arg().set("trace","if we should output heaps of logging. set to 'fail' to only log failing domains")="off"; ::arg().set("dnssec", "DNSSEC mode: off/process (default)/log-fail/validate")="process"; - ::arg().set("daemon","Operate as a daemon")="yes"; + ::arg().set("daemon","Operate as a daemon")="no"; ::arg().setSwitch("write-pid","Write a PID file")="yes"; ::arg().set("loglevel","Amount of logging. Higher is more. Do not set below 3")="4"; ::arg().set("log-common-errors","If we should log rather common errors")="yes"; -- 2.40.0