diff --git a/config.vars.in b/config.vars.in index 00f6d7341..42cdabbac 100644 --- a/config.vars.in +++ b/config.vars.in @@ -37,7 +37,7 @@ %% Platform-specific installation paths {release, true}. -{release_dir, "@RELEASE_DIR@"}. +{release_dir, "${SCRIPT_DIR%/*}"}. {sysconfdir, "{{release_dir}}/etc"}. {installuser, "@INSTALLUSER@"}. {erl, "{{release_dir}}/{{erts_vsn}}/bin/erl"}. diff --git a/ejabberdctl.template b/ejabberdctl.template index bb707b2ae..387eaab7b 100755 --- a/ejabberdctl.template +++ b/ejabberdctl.template @@ -7,6 +7,8 @@ ERL_MAX_PORTS=32000 ERL_PROCESSES=250000 ERL_MAX_ETS_TABLES=1400 +SCRIPT_DIR=$(cd ${0%/*} && pwd) + # define default environment variables NODE=ejabberd HOST=localhost diff --git a/rel/files/erl b/rel/files/erl index 34c158340..6f65e3fc9 100755 --- a/rel/files/erl +++ b/rel/files/erl @@ -9,10 +9,13 @@ ## Note that this script makes the assumption that there is a start_clean.boot ## file available in $ROOTDIR/release/VSN. +# Determine the abspath of where this script is executing from. +ERTS_BIN_DIR=$(cd ${0%/*} && pwd) + # Now determine the root directory -- this script runs from erts-VSN/bin, # so we simply need to strip off two dirs from the end of the ERTS_BIN_DIR # path. -ROOTDIR={{release_dir}} +ROOTDIR=${ERTS_BIN_DIR%/*/*} # Parse out release and erts info START_ERL=`cat $ROOTDIR/releases/start_erl.data`