Better release directory detection

This commit is contained in:
Evgeniy Khramtsov 2013-05-08 22:52:10 +10:00
parent 8229ee8dd8
commit b13c51c8cf
3 changed files with 7 additions and 2 deletions

View File

@ -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"}.

View File

@ -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

View File

@ -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`