dockersetup: require email address

Do not allow proceeding until an email address has been entered, because
we need it later on for creating the superuser account.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
Paul Eggleton 2019-04-01 16:02:01 +13:00
parent c32fdd8c9e
commit a823789ab2

View File

@ -507,7 +507,13 @@ if not updatemode:
print('You will now be asked for an email address. This will be used for the superuser account, to send error reports to and for Let\'s Encrypt.')
else:
print('You will now be asked for an email address. This will be used for the superuser account and to send error reports to.')
emailaddr = None
while True:
emailaddr = input('Enter your email address: ')
if '@' in emailaddr:
break
else:
print('Entered email address is not valid')
if reinstmode:
return_code = subprocess.call("docker-compose down -v", shell=True)