From 0fb384235f6e7e9ceb3a8b12538428e7842bc789 Mon Sep 17 00:00:00 2001 From: Christian Hofstaedtler Date: Wed, 5 Jun 2013 04:38:33 +0200 Subject: [PATCH] Add exit codes to pdns-recursor init script Fixes #676. --- pdns/pdns-recursor.init.d | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pdns/pdns-recursor.init.d b/pdns/pdns-recursor.init.d index ebab3d8522..5551fd96a4 100755 --- a/pdns/pdns-recursor.init.d +++ b/pdns/pdns-recursor.init.d @@ -33,8 +33,13 @@ case "$1" in if test "$NOTRUNNING" = "0" then echo "running" + exit 0 else echo "not running" + # Note: 3 is a white lie. We currently don't *really* + # know that it's not running, or if the ping failed for + # other reasons (= 4). + exit 3 fi ;; @@ -46,6 +51,7 @@ case "$1" in echo $ret else echo "not running" + exit 1 fi ;; @@ -61,6 +67,7 @@ case "$1" in if test "$NOTRUNNING" = "0" then echo "already running" + exit 1 else $pdns_server --daemon if test "$?" = "0" -- 2.47.3