From: Bert Hubert Date: Sun, 4 Mar 2012 20:15:46 +0000 (+0000) Subject: improved init.d 'restart' logic so it devolves to 'start' if we are not running X-Git-Tag: auth-3.1-rc1~64 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e7526caa15d23b5f5117a1fb8ae80e3e468366f0;p=pdns 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 --- 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 ;;