aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--priv/templates/extended_bin.dtl32
2 files changed, 19 insertions, 14 deletions
diff --git a/.gitignore b/.gitignore
index 79a42f3..13cbe44 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,3 +12,4 @@ test/*_data
_rel/*
.*
erl_crash.dump
+rebar
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