fixed missing www Question whiptail menu

This commit is contained in:
2020-10-09 14:15:43 +02:00
parent 79916b0fce
commit de53e32441

View File

@@ -226,11 +226,16 @@ source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/M
if [ $IMODE = n ]; then
if [ $TestMode = 0 ]; then
domain=$(whiptail --nocancel --inputbox " Enter the domain without WWW " 11 82 --title "Config" 3>&1 1>&2 2>&3)
if (whiptail --title "Set sitename?" --yesno "Set sitename to ${domain//./_} ?" 8 78); then
if (whiptail --title "Config" --yesno "Does www.${domain} exist in DNS?" 11 82 ); then
sslenable=1
else
sslenable=0
fi
if (whiptail --title "Config" --yesno "Set sitename to ${domain//./_} ?" 8 78 ); then
sitename=${domain//./_}
else
while true; do
sitename=$(whiptail --nocancel --inputbox "Enter sitename, Must NOT contain special characters, except: _" 8 66 --title "Sitename" 3>&1 1>&2 2>&3)
sitename=$(whiptail --nocancel --inputbox "Enter sitename, Must NOT contain special characters, except: _" 8 66 --title "Config" 3>&1 1>&2 2>&3)
if [[ $sitename == *['!'@#\$%^\&*()+,.]* ]] || [ -z "$sitename" ]
then
whiptail --msgbox " Site can't be empty, or contain a special character except for: _" 11 76