]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Add exit codes to pdns-recursor init script 849/head
authorChristian Hofstaedtler <christian@hofstaedtler.name>
Wed, 5 Jun 2013 02:38:33 +0000 (04:38 +0200)
committerChristian Hofstaedtler <christian@hofstaedtler.name>
Wed, 5 Jun 2013 02:39:34 +0000 (04:39 +0200)
Fixes #676.

pdns/pdns-recursor.init.d

index ebab3d8522a25d8e9b5f4c9a7190a07bccdb5af5..5551fd96a467b4b57ebd6e36cc6e52aca13a71a3 100755 (executable)
@@ -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"