move domain check before cheking open port

This commit is contained in:
Daniel Hansson 2019-04-11 19:16:48 +02:00 committed by GitHub
parent 71f687e1c5
commit dda7b24ce4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -79,15 +79,6 @@ then
fi
done
# Check if port is open with NMAP
sed -i "s|127.0.1.1.*|127.0.1.1 $domain nextcloud|g" /etc/hosts
network_ok
check_open_port 80 "$domain"
check_open_port 443 "$domain"
# Fetch latest version of test-new-config.sh
check_command download_le_script test-new-config
# Check if $domain exists and is reachable
echo
print_text_in_color "$ICyan" "Checking if $domain exists and is reachable..."
@ -100,6 +91,15 @@ it to this server before you can run this script."
exit 1
fi
# Check if port is open with NMAP
sed -i "s|127.0.1.1.*|127.0.1.1 $domain nextcloud|g" /etc/hosts
network_ok
check_open_port 80 "$domain"
check_open_port 443 "$domain"
# Fetch latest version of test-new-config.sh
check_command download_le_script test-new-config
# Install certbot (Let's Encrypt)
install_certbot