mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2024-11-26 02:57:04 +00:00
don't ask the user to create an email account if the shell is non-interactive and provide a better default for the domain name
This commit is contained in:
parent
89bb5da986
commit
3fdcbe542f
@ -62,14 +62,15 @@ EOF
|
|||||||
. scripts/web.sh
|
. scripts/web.sh
|
||||||
. scripts/webmail.sh
|
. scripts/webmail.sh
|
||||||
|
|
||||||
|
if [ -t 0 ]; then # are we in an interactive shell?
|
||||||
if [ -z "`tools/mail.py user`" ]; then
|
if [ -z "`tools/mail.py user`" ]; then
|
||||||
# The outut of "tools/mail.py user" is a list of mail users. If there
|
# The outut of "tools/mail.py user" is a list of mail users. If there
|
||||||
# are none configured, ask the user to configure one.
|
# are none configured, ask the user to configure one.
|
||||||
echo
|
echo
|
||||||
echo "Let's create your first mail user."
|
echo "Let's create your first mail user."
|
||||||
read -e -i "user@`hostname`" -p "Email Address: " EMAIL_ADDR
|
read -e -i "user@$PUBLIC_HOSTNAME" -p "Email Address: " EMAIL_ADDR
|
||||||
tools/mail.py user add $EMAIL_ADDR # will ask for password
|
tools/mail.py user add $EMAIL_ADDR # will ask for password
|
||||||
tools/mail.py alias add hostmaster@$PUBLIC_HOSTNAME $EMAIL_ADDR
|
tools/mail.py alias add hostmaster@$PUBLIC_HOSTNAME $EMAIL_ADDR
|
||||||
tools/mail.py alias add postmaster@$PUBLIC_HOSTNAME $EMAIL_ADDR
|
tools/mail.py alias add postmaster@$PUBLIC_HOSTNAME $EMAIL_ADDR
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user