aboutsummaryrefslogtreecommitdiffstats
path: root/priv/templates
diff options
context:
space:
mode:
authorerlanger <erlanger>2016-01-22 22:25:17 -0500
committererlanger <erlanger>2016-01-22 22:25:17 -0500
commit1b159fed973f30e545228b99494cf5c3680b30a0 (patch)
tree441beb307f13c387fe725723d18e15aeea5073d0 /priv/templates
parent5221acdf8f79a26d4438cb26c4215af22ac04400 (diff)
downloadrelx-1b159fed973f30e545228b99494cf5c3680b30a0.tar.gz
relx-1b159fed973f30e545228b99494cf5c3680b30a0.tar.bz2
relx-1b159fed973f30e545228b99494cf5c3680b30a0.zip
replacing OS vars: comply with otp sys.config requirement
Diffstat (limited to 'priv/templates')
-rwxr-xr-xpriv/templates/extended_bin7
1 files changed, 5 insertions, 2 deletions
diff --git a/priv/templates/extended_bin b/priv/templates/extended_bin
index 346a88c..b752229 100755
--- a/priv/templates/extended_bin
+++ b/priv/templates/extended_bin
@@ -116,8 +116,11 @@ if [ -z "$RELX_CONFIG_PATH" ]; then
fi
if [ $RELX_REPLACE_OS_VARS ]; then
- awk '{while(match($0,"[$]{[^}]*}")) {var=substr($0,RSTART+2,RLENGTH -3);gsub("[$]{"var"}",ENVIRON[var])}}1' < $RELX_CONFIG_PATH > $RELX_CONFIG_PATH.2.config
- RELX_CONFIG_PATH=$RELX_CONFIG_PATH.2.config
+ #Make sure we don't break dev mode by keeping the symbolic link
+ orig_relx_config_path="$RELX_CONFIG_PATH.orig"
+ mv "$RELX_CONFIG_PATH" "$orig_relx_config_path"
+
+ awk '{while(match($0,"[$]{[^}]*}")) {var=substr($0,RSTART+2,RLENGTH -3);gsub("[$]{"var"}",ENVIRON[var])}}1' < "$orig_relx_config_path" > "$RELX_CONFIG_PATH"
fi
# Extract the target node name from node.args