Skip to content

Commit

Permalink
Commit 731bd1c mostly reverted: apparently tests rely on return code …
Browse files Browse the repository at this point in the history
…and synchronicity (is_alive) even in the absence of relx hooks.
  • Loading branch information
Olivier-Boudeville committed Aug 11, 2020
1 parent 155a968 commit 0be3b94
Showing 1 changed file with 13 additions and 17 deletions.
30 changes: 13 additions & 17 deletions priv/templates/extended_bin
Original file line number Diff line number Diff line change
Expand Up @@ -715,15 +715,13 @@ case "$1" in
"exec \"$RELEASE_ROOT_DIR/bin/$REL_NAME\" \"$START_OPTION\" $ARGS --relx-disable-hooks"

# Wait for node to be up before running any hooks
if [ -n "$POST_START_HOOKS" ]; then
while ! erl_rpc erlang is_alive > /dev/null 2>&1
do
sleep 1
done

relx_run_hooks "$POST_START_HOOKS"
fi
;;
while ! erl_rpc erlang is_alive > /dev/null 2>&1
do
sleep 1
done

relx_run_hooks "$POST_START_HOOKS"
;;

stop)
relx_run_hooks "$PRE_STOP_HOOKS"
Expand All @@ -738,14 +736,12 @@ case "$1" in
done

# Wait for node to be down before running any hooks
if [ -n "$POST_STOP_HOOKS" ]; then
while erl_rpc erlang is_alive > /dev/null 2>&1
do
sleep 1
done

relx_run_hooks "$POST_STOP_HOOKS"
fi
while erl_rpc erlang is_alive > /dev/null 2>&1
do
sleep 1
done

relx_run_hooks "$POST_STOP_HOOKS"
;;

restart)
Expand Down

0 comments on commit 0be3b94

Please sign in to comment.