]> arthur.barton.de Git - ngircd-alex.git/blobdiff - contrib/Debian/ngircd.init
Xcode: remove imp.h and exp.h from project file
[ngircd-alex.git] / contrib / Debian / ngircd.init
index 6a418d78ab506e97e96a5ef4b2586ff367940012..5c8c46cab82341f20f3d02a20449299db98911f5 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 #
 # ngIRCd start and stop script for Debian-based systems
-# Copyright 2008-2010 Alexander Barton <alex@barton.de>
+# Copyright 2008-2013 Alexander Barton <alex@barton.de>
 #
 
 ### BEGIN INIT INFO
@@ -24,13 +24,13 @@ PARAMS=""
 STARTTIME=1
 DIETIME=10
 
-test -x $DAEMON || exit 5
-
 test -h "$0" && me=`readlink $0` || me="$0"
 BASENAME=`basename $me`
 
 test -r /etc/default/$BASENAME && . /etc/default/$BASENAME
 
+test -x $DAEMON || exit 5
+
 # LSB compatibility functions that become used if there is no local
 # include file available.
 log_daemon_msg() {
@@ -84,6 +84,7 @@ Do_Start() {
                log_warning_msg "$NAME seems to be already running, nothing to do."
                exit 0
        fi
+       rm -f "$PIDFILE"
        start-stop-daemon --start \
                --quiet --exec $DAEMON -- $PARAMS
        sleep $STARTTIME