Skip to content

Commit

Permalink
fix: correct documentation around the passphrase parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
josegonzalez committed Dec 2, 2018
1 parent c452cff commit 273f794
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -23,7 +23,7 @@ mariadb:backup-auth <name> <aws_access_key_id> <aws_secret_access_key> (<aws_def
mariadb:backup-deauth <name> Removes backup authentication for the mariadb service
mariadb:backup-schedule <name> <schedule> <bucket> Schedules a backup of the mariadb service
mariadb:backup-schedule-cat <name> Cat the contents of the configured backup cronfile for the service
mariadb:backup-set-encryption <name> <encryption_key> Sets up GPG encryption for future backups of the mariadb service
mariadb:backup-set-encryption <name> <passphrase> Set a GPG passphrase for backups
mariadb:backup-unschedule <name> Unschedules the backup of the mariadb service
mariadb:backup-unset-encryption <name> Removes backup encryption for future backups of the mariadb service
mariadb:clone <name> <new-name> Create container <new-name> then copy data from <name> into <new-name>
Expand Down
10 changes: 5 additions & 5 deletions subcommands/backup-set-encryption
Expand Up @@ -5,19 +5,19 @@ source "$PLUGIN_BASE_PATH/common/functions"
source "$(dirname "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)")/functions"

service-backup-set-encryption-cmd() {
#E set a GPG encryption key for backups
#E set a GPG passphrase for backups
#E dokku $PLUGIN_COMMAND_PREFIX:backup-set-encryption lolipop
#A service, service to run command against
#A encryption-key, a GPG encryption key
#A passphrase, a GPG-compatible passphrase
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"
declare SERVICE="$1" PASSPHRASE="$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"
[[ -z "$PASSPHRASE" ]] && dokku_log_fail "Please specify a GPG backup passphrase"
verify_service_name "$SERVICE"
service_backup_set_encryption "$SERVICE" "$ENCRYPTION_KEY"
service_backup_set_encryption "$SERVICE" "$PASSPHRASE"
}

service-backup-set-encryption-cmd "$@"

0 comments on commit 273f794

Please sign in to comment.