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 /tools/ejabberdctl | |
parent | typo fix (diff) |
* tools/ejabberdctl: Work also when 'which' is unavailable
SVN Revision: 1419
Diffstat (limited to '')
-rwxr-xr-x | tools/ejabberdctl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/ejabberdctl b/tools/ejabberdctl index 9d3f7bd5..c821e808 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 |