Fix signal handling

This patch add `exec` to replace the shell running the `entrypoint.sh`
script by Prosody executable.

This allows Prosody to catch and handle correctly signals, notably
SIGTERM and SIGINT. Without it, Docker can't stop correctly the
container, resulting in a 10 s delay before it kills it.
This commit is contained in:
Jérôme Poisson 2020-10-10 21:20:17 +02:00
parent 4878e32010
commit cc88073a79

View file

@ -12,4 +12,4 @@ if [ "$LOCAL" -a "$PASSWORD" -a "$DOMAIN" ] ; then
prosodyctl register "$LOCAL" "$DOMAIN" "$PASSWORD" prosodyctl register "$LOCAL" "$DOMAIN" "$PASSWORD"
fi fi
runuser -u prosody -- "$@" exec runuser -u prosody -- "$@"