2
0
Fork 0
mirror of https://github.com/friendica/docker synced 2024-05-29 14:18:17 +02:00
docker/docker-cron.sh
Philipp Holzer 43b1640b80
Add MySQL DB wait possibility
- remove sleep
- Add new binary "wait-for-connection" in /usr/local/bin
- Use new possibility for auto-installer
2019-11-28 20:50:59 +01:00

13 lines
344 B
Bash
Executable file

#!/bin/sh
trap "break;exit" HUP INT TERM
while [ ! -f /var/www/html/bin/daemon.php ]; do
sleep 1
done
echo "Waiting for MySQL $MYSQL_HOST initialization..."
if /usr/local/bin/wait-for-connection "$MYSQL_HOST" "$MYSQL_PORT" 300; then
exec php /var/www/html/bin/daemon.php -f start
echo "[ERROR] Waited 300 seconds, no response" >&2
fi