diff options
author | Badlop <badlop@process-one.net> | 2008-07-08 11:07:45 +0000 |
---|---|---|
committer | Badlop <badlop@process-one.net> | 2008-07-08 11:07:45 +0000 |
commit | 19308d34e26688e7b31111dfd9eb851e47d0c6a7 (patch) | |
tree | 3091ad31881f91a17bab02b0c1b6173ac88f55e0 | |
parent | typo fix (diff) |
* tools/ejabberdctl: Work also when 'which' is unavailable
SVN Revision: 1419
-rw-r--r-- | ChangeLog | 4 | ||||
-rwxr-xr-x | tools/ejabberdctl | 3 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,7 @@ +2008-07-08 Badlop <badlop@process-one.net> + + * tools/ejabberdctl: Work also when 'which' is unavailable + 2008-07-08 Christophe Romain <christophe.romain@process-one.net> * src/web/ejabberd_http_poll.erl: improve ip fetching patch diff --git a/tools/ejabberdctl b/tools/ejabberdctl index 9d3f7bd5a..c821e8081 100755 --- a/tools/ejabberdctl +++ b/tools/ejabberdctl @@ -4,7 +4,8 @@ NODE=ejabberd HOST=localhost # Define ejabberd environment -base="`dirname $(which "$0")`/.." +here=`which "$0" 2>/dev/null || echo .` +base="`dirname $here`/.." ROOTDIR=`(cd "$base"; echo $PWD)` SASL_LOG_PATH=$ROOTDIR/sasl.log EJABBERD_DB=$ROOTDIR/database/$NODE |