mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-06-24 09:49:12 +02:00
feat: Add password confirmation (#4072)
Co-authored-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
This commit is contained in:
parent
98cbcfc171
commit
d7dab2d20d
7 changed files with 15 additions and 10 deletions
|
@ -98,9 +98,14 @@ function __account_already_exists() {
|
|||
|
||||
# Also used by addsaslpassword
|
||||
function _password_request_if_missing() {
|
||||
local PASSWD_CONFIRM
|
||||
if [[ -z ${PASSWD} ]]; then
|
||||
read -r -s -p 'Enter Password: ' PASSWD
|
||||
echo
|
||||
[[ -z ${PASSWD} ]] && _exit_with_error 'Password must not be empty'
|
||||
|
||||
read -r -s -p 'Confirm Password: ' PASSWD_CONFIRM
|
||||
echo
|
||||
[[ ${PASSWD} != "${PASSWD_CONFIRM}" ]] && _exit_with_error 'Passwords do not match!'
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue