Uppercase APP like the rest
This commit is contained in:
parent
cf70f57d7f
commit
1451558efa
18
functions
18
functions
@ -19,26 +19,26 @@ dokku-ansible-deploy-vault-pass-cmd() {
|
||||
# shellcheck disable=SC2034
|
||||
declare desc="add new app vault password for decryption of passwords"
|
||||
|
||||
local app="$2"
|
||||
local vault_file="$DOKKU_LIB_ROOT/data/deploy.d/$app/.vault-password.sh"
|
||||
declare APP="$2"
|
||||
declare vault_file="$DOKKU_LIB_ROOT/data/deploy.d/$APP/.vault-password.sh"
|
||||
|
||||
if [[ ! -n "$app" ]]; then
|
||||
if [[ ! -n "$APP" ]]; then
|
||||
dokku_col_log_info1_quiet "missing app name, try 'dokku ansible-deploy:vault-pass myappname'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -f $vault_file ]]; then
|
||||
dokku_col_log_info1_quiet "Vault password already in place"
|
||||
dokku_col_log_info1_quiet "Vault password already setup for $APP"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2162 disable=SC2116 disable=SC2006
|
||||
read -p "Please enter your vault password for $app: `echo $'\n> '`" vault_password
|
||||
read -p "Please enter your vault password for $APP: `echo $'\n> '`" vault_password
|
||||
|
||||
if [[ ! -d "$DOKKU_LIB_ROOT/data/deploy.d/$app" ]]; then
|
||||
mkdir -p "$DOKKU_LIB_ROOT/data/deploy.d/$app"
|
||||
if [[ ! -d "$DOKKU_LIB_ROOT/data/deploy.d/$APP" ]]; then
|
||||
mkdir -p "$DOKKU_LIB_ROOT/data/deploy.d/$APP"
|
||||
fi
|
||||
dokku_col_log_info1_quiet "Created $DOKKU_LIB_ROOT/data/deploy.d/$app"
|
||||
dokku_col_log_info1_quiet "Created $DOKKU_LIB_ROOT/data/deploy.d/$APP"
|
||||
|
||||
{ echo "#!/bin/bash";
|
||||
echo "";
|
||||
@ -48,7 +48,7 @@ dokku-ansible-deploy-vault-pass-cmd() {
|
||||
|
||||
chmod +x "$vault_file"
|
||||
|
||||
dokku_col_log_info1_quiet "Generated $vault_file"
|
||||
dokku_col_log_info1_quiet "Generated $vault_file for $APP"
|
||||
}
|
||||
|
||||
dokku-ansible-deploy-dependencies() {
|
||||
|
Reference in New Issue
Block a user