2018-05-18 21:20:22 +02:00
|
|
|
#!/bin/sh
|
2018-05-22 21:47:37 +02:00
|
|
|
trap "break;exit" HUP INT TERM
|
2018-05-21 21:32:26 +02:00
|
|
|
|
2019-11-28 20:50:59 +01:00
|
|
|
while [ ! -f /var/www/html/bin/daemon.php ]; do
|
2020-06-15 00:30:25 +02:00
|
|
|
sleep 1
|
2018-05-21 21:32:26 +02:00
|
|
|
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-07-23 23:05:23 +02:00
|
|
|
sh /setup_msmtp.sh
|
2021-09-03 21:13:29 +02:00
|
|
|
exec gosu www-data:www-data 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
|