From 9b4f62f5e97865a3ef7a5fb8a400b23e36595d80 Mon Sep 17 00:00:00 2001 From: Adrien Ferrand Date: Mon, 4 Jun 2018 22:09:37 +0200 Subject: [PATCH] Correct entrypoint.sh causing bootloop in some cases (#1628) * Correct bootloop in some cases. Lines "kill -15 $SUPERVISOR_PID" then "wait $SUPERVISOR_PID" may fail if process is killed sufficiently fast. Command "ps -p" ensure process is still here before waiting to its state to change. * Less output --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index c846969b..3d810ef4 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -19,7 +19,7 @@ case ${1} in SUPERVISOR_PID=$! migrate_database kill -15 $SUPERVISOR_PID - wait $SUPERVISOR_PID + ps h -p $SUPERVISOR_PID > /dev/null && wait $SUPERVISOR_PID rm -rf /var/run/supervisor.sock exec /usr/bin/supervisord -nc /etc/supervisor/supervisord.conf ;;