2
0
Fork 0
mirror of https://github.com/friendica/docker synced 2024-11-05 22:51:52 +01:00
docker/docker-cron.sh
Philipp Holzer 784da433d7
Use MSMTP settings in cron
- Extract msmtp setup into own file
- use msmtp setup in cron and app container
- fix wrong SMTP Env variable
2020-07-23 23:05:23 +02:00

15 lines
397 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 php /var/www/html/bin/wait-for-connection "$MYSQL_HOST" "${MYSQL_PORT:-3306}" 300; then
sh /setup_msmtp.sh
exec /sbin/tini -- php /var/www/html/bin/daemon.php -f start
else
echo "[ERROR] Waited 300 seconds, no response" >&2
fi