Early hostname check (#456)

* Move hostname check to earlier in the process

* Provide instruction on hostname check failure

* Fix instruction in case of hostname failure
This commit is contained in:
Rafael dos Santos Silva 2020-02-19 16:27:34 -03:00 committed by GitHub
parent 653abe2472
commit d3e3857ddc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 10 deletions

View File

@ -68,11 +68,9 @@ check_IP_match() {
echo
echo Google: \"open ports YOUR CLOUD SERVICE\" for information for resolving this problem.
echo
echo You should probably answer \"n\" at the next prompt and disable Let\'s Encrypt.
echo
echo This test might not work for all situations,
echo "so if you can access Discourse at http://$HOST, you might try anyway."
sleep 3
echo If you want to proceed anyway, you will need to
echo edit the containers/app.yml file manually.
exit 1
;;
2)
echo "Continuing without port check."
@ -374,6 +372,8 @@ ask_user_for_config() {
fi
fi
check_IP_match $hostname
if [ ! -z "$developer_emails" ]
then
read -p "Email address for admin account(s)? [$developer_emails]: " new_value
@ -450,11 +450,6 @@ ask_user_for_config() {
fi
fi
if [ "$letsencrypt_status" == "Enter 'OFF' to disable." ]
then
check_IP_match $hostname
fi
echo -e "\nDoes this look right?\n"
echo "Hostname : $hostname"
echo "Email : $developer_emails"