create the log file
All checks were successful
Build and Push Docker Image / build (push) Successful in 39s
All checks were successful
Build and Push Docker Image / build (push) Successful in 39s
This commit is contained in:
@@ -33,3 +33,4 @@ RUN chmod +x /usr/local/bin/backup.sh \
|
|||||||
COPY services/backupbot/run /etc/services.d/backupbot/run
|
COPY services/backupbot/run /etc/services.d/backupbot/run
|
||||||
RUN chmod +x /etc/services.d/backupbot/run
|
RUN chmod +x /etc/services.d/backupbot/run
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,9 @@ echo "[BACKUPBOT_INFO] Starting PostgreSQL backup loop service..."
|
|||||||
|
|
||||||
# Optional configurable interval (default 24 hours)
|
# Optional configurable interval (default 24 hours)
|
||||||
INTERVAL_HOURS="${INTERVAL_HOURS:-24}"
|
INTERVAL_HOURS="${INTERVAL_HOURS:-24}"
|
||||||
|
if [[ ! -f /config/log/backupbot.log ]]; then
|
||||||
|
touch /config/log/backupbot.log
|
||||||
|
fi
|
||||||
while true; do
|
while true; do
|
||||||
echo "[BACKUPBOT_INFO] Triggering backup.sh at $(date)"
|
echo "[BACKUPBOT_INFO] Triggering backup.sh at $(date)"
|
||||||
/usr/local/bin/backup.sh >>/config/log/backupbot.log 2>&1
|
/usr/local/bin/backup.sh >>/config/log/backupbot.log 2>&1
|
||||||
|
|||||||
Reference in New Issue
Block a user