From 7db6d289687de87695bfaf0ee36c5100da9c2abd Mon Sep 17 00:00:00 2001 From: wh1te909 Date: Sun, 18 Oct 2020 20:08:51 +0000 Subject: [PATCH] force valid email to prevent errors with createsuperuser and meshcentral setup --- install.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/install.sh b/install.sh index 471b4d1c..d3d97b87 100755 --- a/install.sh +++ b/install.sh @@ -1,6 +1,6 @@ #!/bin/bash -SCRIPT_VERSION="12" +SCRIPT_VERSION="13" SCRIPT_URL='https://raw.githubusercontent.com/wh1te909/tacticalrmm/develop/install.sh' GREEN='\033[0;32m' @@ -83,9 +83,15 @@ echo -ne "${YELLOW}Enter the subdomain for meshcentral (e.g. mesh.example.com)${ read meshdomain done -echo -ne "${YELLOW}Enter the root domain for LetsEncrypt (e.g. example.com or example.co.uk)${NC}: " +echo -ne "${YELLOW}Enter the root domain (e.g. example.com or example.co.uk)${NC}: " read rootdomain +while [[ $letsemail != *[@]*[.]* ]] +do +echo -ne "${YELLOW}Enter a valid email address for django and meshcentral${NC}: " +read letsemail +done + # if server is behind NAT we need to add the 3 subdomains to the host file # so that nginx can properly route between the frontend, backend and meshcentral # EDIT 8-29-2020 @@ -142,12 +148,6 @@ done if [[ $LETS_ENCRYPT == "y" ]]; then - while [[ $letsemail != *[@]*[.]* ]] - do - echo -ne "${YELLOW}Enter a valid email address for let's encrypt renewal notifications and meshcentral${NC}: " - read letsemail - done - print_green 'Getting wildcard cert' sudo certbot certonly --manual -d *.${rootdomain} --agree-tos --no-bootstrap --manual-public-ip-logging-ok --preferred-challenges dns -m ${letsemail} --no-eff-email