Early hostname check (#456)
authorRafael dos Santos Silva <xfalcox@gmail.com>
Wed, 19 Feb 2020 19:27:34 +0000 (16:27 -0300)
committerGitHub <noreply@github.com>
Wed, 19 Feb 2020 19:27:34 +0000 (16:27 -0300)
* Move hostname check to earlier in the process

* Provide instruction on hostname check failure

* Fix instruction in case of hostname failure

discourse-setup

index d8636d54f60aca8bd037e910be84f6f47fb38b19..2b86fca40617256e3e5d61c87cb6528c8e7ac684 100755 (executable)
@@ -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"