From cc88073a798dcfcce4bf1e6a118f664477fb283c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Poisson?= Date: Sat, 10 Oct 2020 21:20:17 +0200 Subject: [PATCH] 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. --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 76f0bb1..ff4ea60 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -12,4 +12,4 @@ if [ "$LOCAL" -a "$PASSWORD" -a "$DOMAIN" ] ; then prosodyctl register "$LOCAL" "$DOMAIN" "$PASSWORD" fi -runuser -u prosody -- "$@" +exec runuser -u prosody -- "$@"