Start BEAM with exec to maintain the PID and catch SIGTERM in Docker Stop

Until now, when stopping the ejabberd container, Erlang is not gracefully
closed, Mnesia is not properly closed... exit code is 137.
With this change, when the container is stopped, Erlang receives the
SIGTERM signal, shutsdown, Mnesia database is properly closed, ...
and exit code is 0.
Reference: processone/ejabberd#2822
pull/68/head
Badlop 3 years ago
parent eca259c24f
commit 9adadc6999

@ -119,7 +119,7 @@ exec_cmd()
{
case $EXEC_CMD in
as_install_user) su -s /bin/sh -c '"$0" "$@"' "$INSTALLUSER" -- "$@" ;;
as_current_user) "$@" ;;
as_current_user) exec "$@" ;;
esac
}
exec_erl()

Loading…
Cancel
Save