feat: create backup-schedule-cat subcommand

This commit is contained in:
Jose Diaz-Gonzalez
2018-04-23 14:39:21 -04:00
parent 965ef3ae22
commit 43e7150365
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"