Only ouput secrets warning once

Closes coop-cloud/abra#143.
This commit is contained in:
decentral1se 2021-05-31 21:00:40 +02:00
parent efad71c470
commit 925df196fc
Signed by untrusted user who does not match committer: decentral1se
GPG Key ID: 92DAD76BD9567B8A

14
abra
View File

@ -1658,6 +1658,15 @@ sub_app_secret_generate(){
local secret="$abra__secret_" local secret="$abra__secret_"
local version="$abra__version_" local version="$abra__version_"
local length="$abra__length_" local length="$abra__length_"
local msg_already_outputted=${msg_already_outputted:-"false"}
if [ "$msg_already_outputted" == "false" ]; then
warning "These generated secrets are now stored as encrypted data on your server"
warning "Please take a moment to make sure you have saved a copy of the passwords"
warning "Abra is not able to show the password values in plain text again"
warning "See https://docs.cloud.autonomic.zone/secrets/ for more on secrets"
msg_already_outputted="true"
fi
if [ "$abra___all" == "true" ]; then if [ "$abra___all" == "true" ]; then
# Note(decentral1se): we need to reset the flag here to avoid the infinite # Note(decentral1se): we need to reset the flag here to avoid the infinite
@ -1692,11 +1701,6 @@ sub_app_secret_generate(){
abra__data_="$PW" abra__data_="$PW"
sub_app_secret_insert sub_app_secret_insert
warning "These generated secrets are now stored as encrypted data on your server"
warning "Please take a moment to make sure you have saved a copy of the passwords"
warning "Abra is not able to show the password values in plain text again"
warning "See https://docs.docker.com/engine/swarm/secrets/ for more on secrets"
} }
###### .. app volume ###### .. app volume