fix path for prepase_php.sh and add small breaks

This commit is contained in:
Luis Guzmán 2024-01-23 00:35:51 -06:00
parent 8bcacb670a
commit 55c322e7e0
1 changed files with 7 additions and 3 deletions

View File

@ -96,9 +96,11 @@ do
echo " - Please try again." echo " - Please try again."
fi fi
done done
sleep .1
#Simple DNS test #Simple DNS test
if [ "$PUBLIC_IP" = "$(dig -4 +short "$NC_DOMAIN"|awk -v RS='([0-9]+\\.){3}[0-9]+' 'RT{print RT}')" ]; then if [ "$PUBLIC_IP" = "$(dig -4 +short "$NC_DOMAIN"|awk -v RS='([0-9]+\\.){3}[0-9]+' 'RT{print RT}')" ]; then
echo -e "Server public IP & DNS record for $NC_DOMAIN seems to match, continuing...\n\n" echo -e "Server public IP & DNS record for $NC_DOMAIN seems to match, continuing...\n\n"
sleep .1
else else
echo "Server public IP ($PUBLIC_IP) & DNS record for $NC_DOMAIN don't seem to match." echo "Server public IP ($PUBLIC_IP) & DNS record for $NC_DOMAIN don't seem to match."
echo " > Please check your dns records are applied and updated, otherwise Nextcloud may fail." echo " > Please check your dns records are applied and updated, otherwise Nextcloud may fail."
@ -110,7 +112,7 @@ else
exit exit
fi fi
fi fi
sleep .1
NC_NGINX_CONF="/etc/nginx/sites-available/$NC_DOMAIN.conf" NC_NGINX_CONF="/etc/nginx/sites-available/$NC_DOMAIN.conf"
while [ -z "$NC_USER" ] while [ -z "$NC_USER" ]
do do
@ -119,6 +121,7 @@ do
echo " - This field is mandatory." echo " - This field is mandatory."
fi fi
done done
sleep .1
while [ -z "$NC_PASS" ] || [ ${#NC_PASS} -lt 8 ] while [ -z "$NC_PASS" ] || [ ${#NC_PASS} -lt 8 ]
do do
read -p "Nextcloud user password: " -r NC_PASS read -p "Nextcloud user password: " -r NC_PASS
@ -126,6 +129,7 @@ do
echo -e " - This field is mandatory. \nPlease make sure it's at least 8 characters.\n" echo -e " - This field is mandatory. \nPlease make sure it's at least 8 characters.\n"
fi fi
done done
sleep .1
#Enable HSTS #Enable HSTS
while [ "$ENABLE_HSTS" != "yes" ] && [ "$ENABLE_HSTS" != "no" ] while [ "$ENABLE_HSTS" != "yes" ] && [ "$ENABLE_HSTS" != "no" ]
do do
@ -138,7 +142,7 @@ do
echo " - HSTS will be enabled." echo " - HSTS will be enabled."
fi fi
done done
sleep .1
echo -e "#Default country phone code\n echo -e "#Default country phone code\n
> Starting at Nextcloud 21.x it's required to set a default country phone ISO 3166-1 alpha-2 code.\n > Starting at Nextcloud 21.x it's required to set a default country phone ISO 3166-1 alpha-2 code.\n
>>> https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements <<<\n" >>> https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements <<<\n"
@ -177,7 +181,7 @@ install_ifnot postgresql-"$PSGVER"
#-------------------------------------------------- #--------------------------------------------------
# Prepare PHP # Prepare PHP
#-------------------------------------------------- #--------------------------------------------------
bash files/prepare_php.sh "$MIN_PHP" bash tools/prepare_php.sh "$MIN_PHP"
#-------------------------------------------------- #--------------------------------------------------
# Create DB user # Create DB user