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"