aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2008-07-08 11:07:45 +0000
committerBadlop <badlop@process-one.net>2008-07-08 11:07:45 +0000
commit19308d34e26688e7b31111dfd9eb851e47d0c6a7 (patch)
tree3091ad31881f91a17bab02b0c1b6173ac88f55e0
parenttypo fix (diff)
* tools/ejabberdctl: Work also when 'which' is unavailable
SVN Revision: 1419
-rw-r--r--ChangeLog4
-rwxr-xr-xtools/ejabberdctl3
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 11224b7c1..56a015497 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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