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