1
0
mirror of https://github.com/chylex/My-Server-Docker-Setup.git synced 2025-03-14 13:15:49 +01:00
My-Server-Docker-Setup/.images/db-backup/scripts/entrypoint.sh
2022-05-16 13:25:00 +02:00

13 lines
348 B
Bash

#!/bin/bash
set -e
if [ -f "/backup/restore" ]; then
echo "A backup restore file is present, it is not safe to resume the backup schedule. Waiting for the file to be removed..."
while [ -f "/backup/restore" ]; do
sleep 5s
done
fi
echo "${CRON:-"0 */2 * * *"} /bin/bash /scripts/backup.sh" > /crontab
/bin/supercronic /crontab