From c923cabc19533b25b759f75d4fb6a766096f2915 Mon Sep 17 00:00:00 2001 From: dpeca Date: Sun, 25 Aug 2019 02:10:51 +0200 Subject: [PATCH] Warning when server hostname is not pointing to server IP --- install/vst-install-debian.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/install/vst-install-debian.sh b/install/vst-install-debian.sh index ab2ead26..845ffd5d 100644 --- a/install/vst-install-debian.sh +++ b/install/vst-install-debian.sh @@ -1507,6 +1507,12 @@ fi # Comparing hostname and ip make_ssl=0 host_ip=$(host $servername | head -n 1 | awk '{print $NF}') +if [ "$host_ip" != "$ip" ]; then + echo "***** PROBLEM: Hostname $servername is not pointing to your server (IP address $ip)" + echo "Without pointing your hostname to your IP, LetsEncrypt SSL will not be generated for your server hostname." + read -p "Try to point your hostname $servername to IP address $ip and then press ENTER." + host_ip=$(host $servername | head -n 1 | awk '{print $NF}') +fi if [ "$host_ip" = "$ip" ]; then ip="$servername" make_ssl=1