From 50c0203543b7e069f7354fa6d13d777ce3dac1c1 Mon Sep 17 00:00:00 2001 From: Jassiel Llerena Date: Sun, 7 Aug 2022 12:27:12 -0400 Subject: [PATCH] Fix entrypoint exit trap tail prevents the SIGTERM signal from being handled by the trap at the top of the script. By using wait, it ensures that the signal is caught and handled by the trap. --- entrypoint.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index edf7c52..d62e578 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -59,7 +59,8 @@ echo "start ${GAMESERVER}" sleep 5 ./${GAMESERVER} details -tail -f log/script/* +tail -f log/script/* & +wait $! # with no command, just spawn a running container suitable for exec's if [ $# = 0 ]; then