aboutsummaryrefslogtreecommitdiffstats
path: root/priv/templates
diff options
context:
space:
mode:
authorRoger Lipscombe <[email protected]>2014-03-27 17:21:57 +0000
committerRoger Lipscombe <[email protected]>2014-03-27 17:32:19 +0000
commitbff40282cca09f007bc9e36d1cd09d9fff3309b2 (patch)
treedce482919d5ff8c9503e105830625aa104695f6f /priv/templates
parent356444c3c6f22f441a931cb8a30f5977e447856c (diff)
downloadrelx-bff40282cca09f007bc9e36d1cd09d9fff3309b2.tar.gz
relx-bff40282cca09f007bc9e36d1cd09d9fff3309b2.tar.bz2
relx-bff40282cca09f007bc9e36d1cd09d9fff3309b2.zip
Update startup script to allow overriding config location.
Diffstat (limited to 'priv/templates')
-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