aboutsummaryrefslogtreecommitdiffstats
path: root/priv
diff options
context:
space:
mode:
authorLuis Rascao <[email protected]>2018-08-09 00:26:31 +0100
committerLuis Rascao <[email protected]>2018-10-11 11:20:01 +0100
commite9a8b13668ca3dd1470b8b65320e1491c213c521 (patch)
tree848d8c7e7bfdc7998d99f7e1969ad57794bef714 /priv
parent3d82071245e1c658eef0e70bae297a574c07e6d9 (diff)
downloadrelx-e9a8b13668ca3dd1470b8b65320e1491c213c521.tar.gz
relx-e9a8b13668ca3dd1470b8b65320e1491c213c521.tar.bz2
relx-e9a8b13668ca3dd1470b8b65320e1491c213c521.zip
Prevent double hook invocation on 'start' command
Diffstat (limited to 'priv')
-rwxr-xr-xpriv/templates/extended_bin6
1 files changed, 5 insertions, 1 deletions
diff --git a/priv/templates/extended_bin b/priv/templates/extended_bin
index 57f4cac..a06c2c3 100755
--- a/priv/templates/extended_bin
+++ b/priv/templates/extended_bin
@@ -530,7 +530,7 @@ case "$1" in
relx_run_hooks "$PRE_START_HOOKS"
"$BINDIR/run_erl" -daemon "$PIPE_DIR" "$RUNNER_LOG_DIR" \
- "exec \"$RELEASE_ROOT_DIR/bin/$REL_NAME\" \"$START_OPTION\" $ARGS"
+ "exec \"$RELEASE_ROOT_DIR/bin/$REL_NAME\" \"$START_OPTION\" --relx-disable-hooks $ARGS"
relx_run_hooks "$POST_START_HOOKS"
;;
@@ -705,6 +705,7 @@ case "$1" in
echo "$RELEASE_ROOT_DIR"
logger -t "$REL_NAME[$$]" "Starting up"
+ relx_run_hooks "$PRE_START_HOOKS"
# Start the VM
exec "$BINDIR/erlexec" $FOREGROUNDOPTIONS \
-boot "$BOOTFILE" -mode "$CODE_LOADING_MODE" \
@@ -712,6 +713,9 @@ case "$1" in
-config "$RELX_CONFIG_PATH" \
-args_file "$VMARGS_PATH" \
-pa ${__code_paths} -- "$@"
+ # exec will replace the current image and nothing else gets
+ # executed from this point on, this explains the absence
+ # of the pre start hook
;;
rpc)
# Make sure a node IS running