File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ ADD . /opt/backups
9191VOLUME ["/data" ]
9292
9393# Define entrypoint script.
94- ENTRYPOINT ["./entrypoint" ]
94+ ENTRYPOINT ["./script/docker- entrypoint.sh " ]
9595
9696# Define default command.
9797CMD ["/sbin/my_init" ]
Original file line number Diff line number Diff line change @@ -17,11 +17,9 @@ case "${BACKUP_COMMAND}" in
1717 # Extract the backup task argument and execute it
1818 shift
1919 BACKUP_TASK=$1
20- shift
2120 command=" script/trigger-backup.sh ${BACKUP_TASK} "
2221 ;;
2322 " schedule" |" scheduler" |" cron" )
24- shift
2523 # Write the crontab entries from the whenever schedule
2624 script/create-schedule.sh
2725 # Call the phusion baseimage docker initialization script
Original file line number Diff line number Diff line change @@ -13,4 +13,6 @@ if [ "${BACKUP_TASK}" == "" ]; then
1313fi
1414
1515echo " Triggering backup task ${BACKUP_TASK} ."
16- exec backup perform --config-file=" ${BACKUP_CONFIG_DIR} /config.rb" --root-path=" ${BACKUP_DATA_DIR} " --trigger ${BACKUP_TASK}
16+ mkdir -p " ${BACKUP_DATA_DIR} /.tmp"
17+ exec /usr/bin/flock --exclusive --wait 300 " ${BACKUP_DATA_DIR} /.tmp/trigger-backup-${BACKUP_TASK} .lockfile" \
18+ backup perform --config-file=" ${BACKUP_CONFIG_DIR} /config.rb" --root-path=" ${BACKUP_DATA_DIR} " --trigger ${BACKUP_TASK}
You can’t perform that action at this time.
0 commit comments