aboutsummaryrefslogtreecommitdiff
path: root/ejabberdctl.template
diff options
context:
space:
mode:
Diffstat (limited to 'ejabberdctl.template')
-rwxr-xr-xejabberdctl.template3
1 files changed, 2 insertions, 1 deletions
diff --git a/ejabberdctl.template b/ejabberdctl.template
index bdc9a9189..4cab19977 100755
--- a/ejabberdctl.template
+++ b/ejabberdctl.template
@@ -10,7 +10,8 @@ INET_DIST_INTERFACE=""
ERLANG_NODE=ejabberd@localhost
# define default environment variables
-SCRIPT_DIR=$(cd "${0%/*}" && pwd)
+[ -z "$SCRIPT" ] && SCRIPT=$0
+SCRIPT_DIR="$(cd "$(dirname "$SCRIPT")" && pwd -P)"
ERL="{{erl}}"
IEX="{{bindir}}/iex"
EPMD="{{epmd}}"