Add support to launch backups on startup

This commit is contained in:
Pau RE
2024-09-04 11:26:45 +02:00
parent 9160ab9290
commit 0ec036071e
4 changed files with 11 additions and 0 deletions
+7
View File
@@ -4,4 +4,11 @@ set -Eeo pipefail
# Prevalidate configuration (don't source)
/env.sh
# Initial background backup
if [ "${BACKUP_ON_START}" = "TRUE" ]; then
echo "Launching an startup backup as a background job..."
/backup.sh &
fi
echo "Starting go-cron ($SCHEDULE)..."
exec /usr/local/bin/go-cron -s "$SCHEDULE" -p "$HEALTHCHECK_PORT" -- /backup.sh