reset vars in vhost

This commit is contained in:
Bachir Soussi Chiadmi 2021-05-31 09:47:45 +02:00
parent e9f4ea86f5
commit 443fb016bd

View File

@ -27,6 +27,7 @@ if [ "$vh" = "y" ]; then
fi
fi
_domain=""
while [ "$_domain" = "" ]
do
read -p "enter a domain name ? " _domain
@ -41,6 +42,7 @@ if [ "$vh" = "y" ]; then
done
# ask for simple php conf or drupal conf
_drupal=""
while [ "$_drupal" != "yes" ] && [ "$_drupal" != "no" ]
do
echo -n "Is your site is a drupal one? [yes|no] "
@ -48,6 +50,7 @@ if [ "$vh" = "y" ]; then
done
# ask for let's encrypt
_letsencrypt=""
while [ "$_letsencrypt" != "yes" ] && [ "$_letsencrypt" != "no" ]
do
echo -e "\033[35;1mLet's encrypt \033[0m"
@ -111,7 +114,8 @@ if [ "$vh" = "y" ]; then
yn=${yn:-y}
if [ "$yn" = "Y" ] || [ "$yn" = "y" ]; then
# if $user var does not exists (vhost.sh ran directly) ask for it
if [ -z ${user+x} ]; then
user=""
# if [ -z ${user+x} ]; then
while [ "$user" = "" ]
do
read -p "enter an existing user name ? " user
@ -130,7 +134,7 @@ if [ "$vh" = "y" ]; then
fi
fi
done
fi
# fi
echo "shortcut will be installed for '$user'";
sleep 3