]> granicus.if.org Git - pdns/commitdiff
improved init.d 'restart' logic so it devolves to 'start' if we are not running
authorBert Hubert <bert.hubert@netherlabs.nl>
Sun, 4 Mar 2012 20:15:46 +0000 (20:15 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Sun, 4 Mar 2012 20:15:46 +0000 (20:15 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@2462 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/pdns.in

index 66563001cbd87b303d722161300fcc7b89759c8a..3fe1a4c4899f90a836f89f5083a69f8272b67ac2 100755 (executable)
@@ -90,10 +90,16 @@ case "$1" in
 
        force-reload | restart)
                echo -n "Restarting PowerDNS authoritative nameserver: "
-               echo -n stopping and waiting.. 
-               doPC quit
-               sleep 3
-               echo done
+               if test "$NOTRUNNING" = "1" 
+               then 
+                       echo "not running, starting"
+               else
+                       
+                       echo -n stopping and waiting.. 
+                       doPC quit
+                       sleep 3
+                       echo done
+               fi
                $0 start
        ;;