2018-09-09 22:22:24 +02:00
|
|
|
#!/bin/sh
|
|
|
|
trap "break;exit" HUP INT TERM
|
|
|
|
|
2019-11-28 20:50:59 +01:00
|
|
|
while [ ! -f /var/www/html/bin/daemon.php ]; do
|
2018-09-09 22:22:24 +02:00
|
|
|
sleep 1
|
|
|
|
done
|
|
|
|
|
2019-11-28 20:50:59 +01:00
|
|
|
echo "Waiting for MySQL $MYSQL_HOST initialization..."
|
2020-01-06 14:55:52 +01:00
|
|
|
if php /var/www/html/bin/wait-for-connection "$MYSQL_HOST" "${MYSQL_PORT:-3306}" 300; then
|
2020-03-08 20:47:56 +01:00
|
|
|
exec /sbin/tini -- php /var/www/html/bin/daemon.php -f start
|
2019-12-31 01:53:22 +01:00
|
|
|
else
|
2019-11-28 20:50:59 +01:00
|
|
|
echo "[ERROR] Waited 300 seconds, no response" >&2
|
|
|
|
fi
|