From e7526caa15d23b5f5117a1fb8ae80e3e468366f0 Mon Sep 17 00:00:00 2001 From: Bert Hubert Date: Sun, 4 Mar 2012 20:15:46 +0000 Subject: [PATCH] improved init.d 'restart' logic so it devolves to 'start' if we are not running git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@2462 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- pdns/pdns.in | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/pdns/pdns.in b/pdns/pdns.in index 66563001c..3fe1a4c48 100755 --- a/pdns/pdns.in +++ b/pdns/pdns.in @@ -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 ;; -- 2.49.0