Add missing app check

This commit is contained in:
Luke Murphy 2020-04-07 17:00:49 +02:00
parent 4df767fee9
commit 6d1d2235c3
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC

View File

@ -14,9 +14,15 @@ dokku-ansible-deploy-vault-pass-cmd() {
#shellcheck disable=SC2034 #shellcheck disable=SC2034
declare desc="add new app vault password for decryption of passwords" declare desc="add new app vault password for decryption of passwords"
local app="$1"
local vault_file="$DOKKU_LIB_ROOT/data/deploy.d/$app/.vault-password.sh" local vault_file="$DOKKU_LIB_ROOT/data/deploy.d/$app/.vault-password.sh"
local app="$2"
if [[ -n "$app" ]]; then
dokku_col_log_info1_quiet "missing application name, try 'dokku ansible-deploy:vault-pass myappname'"
exit 1
fi
if [[ -f $vault_file ]]; then if [[ -f $vault_file ]]; then
dokku_col_log_info1_quiet "Vault password already in place" dokku_col_log_info1_quiet "Vault password already in place"
exit 0 exit 0