aboutsummaryrefslogtreecommitdiffstats
path: root/priv/templates/extended_bin.dtl
diff options
context:
space:
mode:
authorJordan Wilberding <[email protected]>2014-03-28 17:04:10 +0100
committerJordan Wilberding <[email protected]>2014-03-28 17:04:10 +0100
commita3508b03be8aff8ffafb1a48172d8dd0c8b1be24 (patch)
treeb2ca7a125e5bc81d55125e37cc4137ef1da2d985 /priv/templates/extended_bin.dtl
parent356444c3c6f22f441a931cb8a30f5977e447856c (diff)
parentddb1b1ca899128cb41e448d208b44d9d89a59a33 (diff)
downloadrelx-a3508b03be8aff8ffafb1a48172d8dd0c8b1be24.tar.gz
relx-a3508b03be8aff8ffafb1a48172d8dd0c8b1be24.tar.bz2
relx-a3508b03be8aff8ffafb1a48172d8dd0c8b1be24.zip
Merge pull request #155 from rlipscombe/rl-override-config
Allow VMARGS_PATH and CONFIG_PATH to be overridden
Diffstat (limited to 'priv/templates/extended_bin.dtl')
-rw-r--r--priv/templates/extended_bin.dtl32
1 files changed, 18 insertions, 14 deletions
diff --git a/priv/templates/extended_bin.dtl b/priv/templates/extended_bin.dtl
index 23ba9c4..75f3859 100644
--- a/priv/templates/extended_bin.dtl
+++ b/priv/templates/extended_bin.dtl
@@ -34,15 +34,17 @@ find_sys_config() {
}
# Use $CWD/vm.args if exists, otherwise releases/APP_VSN/vm.args, or else etc/vm.args
-if [ -e "$RELEASE_ROOT_DIR/vm.args" ]; then
- VMARGS_PATH=$RELEASE_ROOT_DIR/vm.args
- USE_DIR=$RELEASE_ROOT_DIR
-else
- USE_DIR=$REL_DIR
- if [ -e "$REL_DIR/vm.args" ]; then
- VMARGS_PATH="$REL_DIR/vm.args"
+if [ -z "$VMARGS_PATH" ]; then
+ if [ -e "$RELEASE_ROOT_DIR/vm.args" ]; then
+ VMARGS_PATH=$RELEASE_ROOT_DIR/vm.args
+ USE_DIR=$RELEASE_ROOT_DIR
else
- VMARGS_PATH="$REL_DIR/vm.args"
+ USE_DIR=$REL_DIR
+ if [ -e "$REL_DIR/vm.args" ]; then
+ VMARGS_PATH="$REL_DIR/vm.args"
+ else
+ VMARGS_PATH="$REL_DIR/vm.args"
+ fi
fi
fi
@@ -50,13 +52,15 @@ fi
mkdir -p $RUNNER_LOG_DIR
# Use releases/VSN/sys.config if it exists otherwise use etc/app.config
-if [ -e "$USE_DIR/sys.config" ]; then
- CONFIG_PATH="$USE_DIR/sys.config"
-else
- if [ -e "$REL_DIR/sys.config" ]; then
- CONFIG_PATH="$REL_DIR/sys.config"
+if [ -z "$CONFIG_PATH" ]; then
+ if [ -e "$USE_DIR/sys.config" ]; then
+ CONFIG_PATH="$USE_DIR/sys.config"
else
- CONFIG_PATH="$REL_DIR/app.config"
+ if [ -e "$REL_DIR/sys.config" ]; then
+ CONFIG_PATH="$REL_DIR/sys.config"
+ else
+ CONFIG_PATH="$REL_DIR/app.config"
+ fi
fi
fi