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