Added check if domain exists on the system
This commit is contained in:
@@ -62,7 +62,6 @@ function LegacyPasswordQuest {
|
||||
if [ -z $passdia ]; then LegacyPasswordQuest; fi
|
||||
mysql -uroot -p"$passdia" -e "" > /dev/null 2>&1
|
||||
if [ $? = 0 ]; then
|
||||
echo "Password is correct"
|
||||
password="$passdia"
|
||||
unset passdia
|
||||
else
|
||||
@@ -79,6 +78,7 @@ function LegacyPasswordQuest {
|
||||
|
||||
if [ $IMODE = n ]; then
|
||||
domain=$(whiptail --nocancel --inputbox " Enter the domain without WWW " 11 82 --title "Config" 3>&1 1>&2 2>&3)
|
||||
[[ -d "/var/www/"$domain"/html" ]] && msg " This domain already exists on this server, Exiting" 8 78 && exit;
|
||||
if (whiptail --title "Config" --yesno " Does www.${domain} exist in DNS" 8 78); then domainwww=1; else domainwww=0; fi
|
||||
if (whiptail --title "Config" --yesno " Enable SSL on installation?" 11 78); then sslenable=1; else sslenable=0; fi
|
||||
PasswordQuest
|
||||
@@ -90,6 +90,7 @@ if [ $IMODE = l ]; then
|
||||
echo "" >/dev/null
|
||||
echo "Enter the domain without WWW:"
|
||||
read domain
|
||||
[[ -d "/var/www/"$domain"/html" ]] && echo " This domain already exists on this server, Exiting" && exit;
|
||||
while true; do
|
||||
read -p "Does www.${domain} exist in DNS -> yes/no?" yn
|
||||
case $yn in
|
||||
|
||||
Reference in New Issue
Block a user