diff --git a/installer.sh b/installer.sh index fa53c0d..c48b075 100644 --- a/installer.sh +++ b/installer.sh @@ -63,6 +63,12 @@ $PKGI curl > $OUTPUT 2>&1 ##--------## if [ $IMODE = n ]; then domain=$(whiptail --nocancel --inputbox " Enter the domain without WWW " 11 82 --title "Config" 3>&1 1>&2 2>&3) +if (whiptail --title "Config" --yesno "Does www.${domain} exist in DNS" 8 78); then domainwww=1; else domainwww=1; fi +if (whiptail --title "Config" --yesno "Hostname with nxdi.nl" 11 82); then + hostname=$(whiptail --nocancel --inputbox " SystemID (eg: VCH001) without ".nxdi.nl" " 11 82 --title "Config" 3>&1 1>&2 2>&3) +else + hostname=$(whiptail --nocancel --inputbox " Hostname " 11 82 --title "Config" 3>&1 1>&2 2>&3) +fi password=$(whiptail --nocancel --passwordbox "Please enter your password (should contain at least 2 digits and 6 characters)" 11 82 --title "Config" 3>&1 1>&2 2>&3) email=$(whiptail --nocancel --inputbox " Enter the administrator e-mail" 11 82 --title "Config" 3>&1 1>&2 2>&3) webserv=$(whiptail --title "Select Webserver" --radiolist "WebServer" 11 53 5 "Nginx:" "Will install NGINX Webserver." ON "Apache:" "Will install Apache Webserver." OFF 3>&1 1>&2 2>&3) @@ -74,6 +80,31 @@ if [ $IMODE = l ]; then echo "" >/dev/null echo "Enter the domain without WWW:" read domain +while true; do + read -p "Does www.${domain} exist in DNS -> yes/no?" yn + case $yn in + [Yy]* ) domainwww=1 + break;; + [Nn]* ) domainwww=0 + break;; + * ) echo "Choose yes of no.";; + esac +done +while true; do + read -p "Hostname with nxdi.nl -> yes/no?" yn + case $yn in + [Nn]* ) + echo 'Enter full hostname:' + read hostname + break;; + [Yy]* ) + echo 'Hostname (eg: VCH001) without ".nxdi.nl":' + read hostname + hostname=$hostname".nxdi.nl" + break;; + * )echo "Choose yes or no.";; + esac +done echo "Please enter your password (should contain at least 2 digits and 6 characters:" read password echo "Administrator E-mail:"