From f63d3ad3f42f4b6fc1cab196e19ddc98ba58e9b6 Mon Sep 17 00:00:00 2001 From: Panagiotis PJ Papadomitsos Date: Tue, 15 Sep 2015 11:19:19 -0700 Subject: Startup script improvements - Made the standard and extended startup scripts self-link-aware. This helps with deployments that symlink the startup script to more standard directories (i.e. /usr/local/bin). readlink is used, which comes standard in all Unix-like distributions - Made the inclusion of a custom sys.config not depend on a custom vm.args file. This way you can use a custom sys.config without using a custom vm.args file --- priv/templates/bin | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'priv/templates/bin') diff --git a/priv/templates/bin b/priv/templates/bin index 8e3f497..3067259 100755 --- a/priv/templates/bin +++ b/priv/templates/bin @@ -2,8 +2,12 @@ set -e -SCRIPT_DIR="$(dirname "$0")" -RELEASE_ROOT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)" +SCRIPT=$(readlink $0) +if [ -z $SCRIPT ]; then + SCRIPT=$0 +fi; +SCRIPT_DIR="$(cd `dirname "$SCRIPT"` && pwd -P)" +RELEASE_ROOT_DIR="$(cd "$SCRIPT_DIR/.." && pwd -P)" REL_NAME="{{ rel_name }}" REL_VSN="{{ rel_vsn }}" ERTS_VSN="{{ erts_vsn }}" -- cgit v1.2.3