create the log file
All checks were successful
Build and Push Docker Image / build (push) Successful in 39s

This commit is contained in:
2025-10-20 01:48:04 -07:00
parent 99c39e91bb
commit 9cc1158985
2 changed files with 4 additions and 1 deletions

View File

@@ -33,3 +33,4 @@ RUN chmod +x /usr/local/bin/backup.sh \
COPY services/backupbot/run /etc/services.d/backupbot/run
RUN chmod +x /etc/services.d/backupbot/run

View File

@@ -5,7 +5,9 @@ echo "[BACKUPBOT_INFO] Starting PostgreSQL backup loop service..."
# Optional configurable interval (default 24 hours)
INTERVAL_HOURS="${INTERVAL_HOURS:-24}"
if [[ ! -f /config/log/backupbot.log ]]; then
touch /config/log/backupbot.log
fi
while true; do
echo "[BACKUPBOT_INFO] Triggering backup.sh at $(date)"
/usr/local/bin/backup.sh >>/config/log/backupbot.log 2>&1