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
This commit is contained in:
Adrien Ferrand 2018-06-04 22:09:37 +02:00 committed by Niclas Mietz
parent 29fa2ff097
commit 9b4f62f5e9

View File

@ -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
;;