From 3277cfdc6b8d56762f82e6f190e3b2755128abe3 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Wed, 14 Dec 2016 19:18:58 -0800 Subject: [PATCH] Remove IP detection logic This code was here to check if user will get an admin certificate. It doesn't work well for intranet cloudron's. The check is also not complete since just DNS is not enough for LE to succeed, we also require port forwarding. --- scripts/cloudron-setup | 54 ------------------------------------------ 1 file changed, 54 deletions(-) diff --git a/scripts/cloudron-setup b/scripts/cloudron-setup index b3e632502..151f14bf7 100755 --- a/scripts/cloudron-setup +++ b/scripts/cloudron-setup @@ -7,43 +7,6 @@ if [[ ${EUID} -ne 0 ]]; then exit 1 fi -ask() { - # http://djm.me/ask - local prompt default REPLY - - while true; do - - if [ "${2:-}" = "Y" ]; then - prompt="Y/n" - default=Y - elif [ "${2:-}" = "N" ]; then - prompt="y/N" - default=N - else - prompt="y/n" - default= - fi - - # Ask the question (not using "read -p" as it uses stderr not stdout) - echo -n "$1 [$prompt] " - - # Read the answer (use /dev/tty in case stdin is redirected from somewhere else) - read REPLY > "${LOG_FILE}"; then exit 1 fi -ip=$(dig a "my.${domain}" +short) -echo "" -if [[ -z "${ip}" ]]; then - echo "No DNS A record found for my.${domain}" - echo "First create a new DNS A record for my.${domain} pointing to the public ip address of this server." - exit 1 -fi - -echo "Found DNS A record for my.${domain} pointing to:" -echo "${ip}" -echo "" -if ! ask "Is this correct?"; then - echo "Please ensure that the A record for my.${domain} is pointing to the correct public ip address of this server." - exit 1 -fi -echo "" - echo "=> Downloading initialization script" if ! curl -s "${INIT_BASESYSTEM_SCRIPT_URL}" > /tmp/initializeBaseUbuntuImage.sh; then echo "Could not download initialization script"