author | Ernesto Alfonso
<erjoalgo@gmail.com> 2023-10-29 03:21:34 UTC |
committer | Alberto Bertogli
<albertito@blitiri.com.ar> 2023-10-29 22:25:35 UTC |
parent | 6713fb7aef6e0307923581d3f64b70eb7c37a3c0 |
docker/add-user.sh | +7 | -4 |
diff --git a/docker/add-user.sh b/docker/add-user.sh index 8bf78be..b2aedf6 100755 --- a/docker/add-user.sh +++ b/docker/add-user.sh @@ -7,16 +7,19 @@ set -e -read -r -p "Email (full user@domain format): " EMAIL +if test -z "${EMAIL:-}"; then + read -r -p "Email (full user@domain format): " EMAIL +fi if ! echo "${EMAIL}" | grep -q @; then echo "Error: email should have '@'." exit 1 fi - -read -r -p "Password: " -s PASSWORD -echo +if test -z "${PASSWORD:-}"; then + read -r -p "Password: " -s PASSWORD + echo +fi DOMAIN=$(echo echo "${EMAIL}" | cut -d '@' -f 2)