From: Alexander Barton Date: Tue, 26 Jul 2005 19:37:18 +0000 (+0000) Subject: Run "basename" on our script name when it is a symlink as well. [from 0-9-x] X-Git-Tag: rel-0-10-0-pre1~138 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=commitdiff_plain;h=e96b4aad2ecac39fbac43d1eb96f9322bd3b2c44 Run "basename" on our script name when it is a symlink as well. [from 0-9-x] --- diff --git a/contrib/Debian/ngircd.init b/contrib/Debian/ngircd.init index dbc7e87f..62373868 100755 --- a/contrib/Debian/ngircd.init +++ b/contrib/Debian/ngircd.init @@ -2,7 +2,7 @@ # # ngIRCd start and stop script for Debian-based systems # -# $Id: ngircd.init,v 1.5 2005/06/01 21:51:11 alex Exp $ +# $Id: ngircd.init,v 1.6 2005/07/26 19:37:18 alex Exp $ # PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin @@ -11,7 +11,8 @@ NAME=ngIRCd DESC="IRC daemon" PARAMS="" -test -h "$0" && BASENAME=`readlink $0` || BASENAME=`basename $0` +test -h "$0" && me=`readlink $0` || me="$0" +BASENAME=`basename $me` test -f /etc/default/$BASENAME && . /etc/default/$BASENAME