Add backup-schedule-info to cat the CRONFILE

This commit is contained in:
Jimmy Lin
2017-08-28 21:25:49 -04:00
committed by Jose Diaz-Gonzalez
parent 646ac0453b
commit 537667c722
3 changed files with 38 additions and 2 deletions

View File

@@ -196,6 +196,18 @@ service_backup_schedule() {
sudo /bin/chmod 644 "$CRON_FILE"
}
service_backup_schedule_cat() {
declare desc="cat the contents of the configured backup cronfile for the service"
declare SERVICE="$1"
local CRON_FILE="/etc/cron.d/dokku-${PLUGIN_COMMAND_PREFIX}-${SERVICE}"
if [[ ! -f "$CRON_FILE" ]]; then
dokku_log_fail "There is no scheduled backup for ${SERVICE}."
fi
cat "$CRON_FILE"
}
service_backup_unschedule() {
declare desc="unschedules the backup of the service"
declare SERVICE="$1"