From 2f24f77368af48f3353aa14d030bd7cfadc33e6f Mon Sep 17 00:00:00 2001
From: MisterBlueBear <51129551+MisterBlueBear@users.noreply.github.com>
Date: Wed, 1 Nov 2023 20:35:15 -0400
Subject: [PATCH] Install script accepts default hostname

---
 webvirtcloud.sh | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/webvirtcloud.sh b/webvirtcloud.sh
index f66cb0f..b846b11 100755
--- a/webvirtcloud.sh
+++ b/webvirtcloud.sh
@@ -424,9 +424,15 @@ until [[ $setupfqdn == "yes" ]] || [[ $setupfqdn == "no" ]]; do
 
   case $setupfqdn in
     [yY] | [yY][Ee][Ss] )
-    echo -n "  Q. What is the FQDN of your server? ($(hostname --fqdn)): "
-      read -r fqdn
+    fqdn=$(hostname --fqdn)
+    echo -n "  Q. What is the FQDN of your server? ($fqdn): "
+      read -r fqdn_from_user
       setupfqdn="yes"
+
+      if [ ! -z $fqdn_from_user ]; then
+        fqdn=$fqdn_from_user
+      fi
+
       echo "     Setting to $fqdn"
       echo ""
       ;;