]> arthur.barton.de Git - ngircd-alex.git/commitdiff
Debian init script: test for binary after reading defaults
authorAlexander Barton <alex@barton.de>
Mon, 19 Aug 2013 21:31:10 +0000 (23:31 +0200)
committerAlexander Barton <alex@barton.de>
Mon, 19 Aug 2013 21:33:11 +0000 (23:33 +0200)
This allows the system administrator to overwrite the DAEMON variable in
/etc/defaults/<name> and to use this init script even when the default
"/usr/sbin/ngircd" doesn't exist on the system.

contrib/Debian/ngircd.default
contrib/Debian/ngircd.init

index 5b6c93fba87872039ae429f8fb228c1cbcf5a5ac..add278f98479e89d99952fc2fbd8849e880f6ca2 100644 (file)
@@ -1,8 +1,6 @@
 #
 # Defaults for ngIRCd start and stop script
 #
 #
 # Defaults for ngIRCd start and stop script
 #
-# $Id: ngircd.default,v 1.1 2003/12/31 17:20:11 alex Exp $
-#
 
 # Parameters to pass to the ngircd daemon on startup, see ngircd(8) for
 # possible options (default: empty).
 
 # Parameters to pass to the ngircd daemon on startup, see ngircd(8) for
 # possible options (default: empty).
index 6a418d78ab506e97e96a5ef4b2586ff367940012..8639e2295b9203550557341eb0601210865fe0c9 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 #
 # ngIRCd start and stop script for Debian-based systems
 #!/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
 #
 
 ### BEGIN INIT INFO
@@ -24,13 +24,13 @@ PARAMS=""
 STARTTIME=1
 DIETIME=10
 
 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 -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() {
 # LSB compatibility functions that become used if there is no local
 # include file available.
 log_daemon_msg() {