refactor: move unimplemented command detection into config file

This commit is contained in:
Jose Diaz-Gonzalez
2018-04-24 00:27:28 -04:00
parent d340b36453
commit fdb90b85a3
17 changed files with 44 additions and 22 deletions

View File

@@ -12,6 +12,7 @@ service-backup-set-encryption-cmd() {
declare desc="sets encryption for all future backups of $PLUGIN_SERVICE service"
local cmd="$PLUGIN_COMMAND_PREFIX:backup-set-encryption" argv=("$@"); [[ ${argv[0]} == "$cmd" ]] && shift 1
declare SERVICE="$1" ENCRYPTION_KEY="$2"
is_implemented_command "$cmd" || dokku_log_fail "Not yet implemented"
[[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a name for the service"
[[ -z "$ENCRYPTION_KEY" ]] && dokku_log_fail "Please specify a GPG encryption key"