aboutsummaryrefslogtreecommitdiffstats
path: root/priv/templates/bin
diff options
context:
space:
mode:
authorPanagiotis PJ Papadomitsos <[email protected]>2015-09-15 11:19:19 -0700
committerPanagiotis PJ Papadomitsos <[email protected]>2015-09-15 11:19:19 -0700
commitf63d3ad3f42f4b6fc1cab196e19ddc98ba58e9b6 (patch)
tree2db2c09c389b4c0a7af9d6c12b60300c883fc64a /priv/templates/bin
parent979766f0f57730af8cea94aa23947026af77f286 (diff)
downloadrelx-f63d3ad3f42f4b6fc1cab196e19ddc98ba58e9b6.tar.gz
relx-f63d3ad3f42f4b6fc1cab196e19ddc98ba58e9b6.tar.bz2
relx-f63d3ad3f42f4b6fc1cab196e19ddc98ba58e9b6.zip
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
Diffstat (limited to 'priv/templates/bin')
-rwxr-xr-xpriv/templates/bin8
1 files changed, 6 insertions, 2 deletions
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 }}"