prepare_php.sh: add missing install_ifnot function #106

Merged
Ark74 merged 13 commits from Ark74/quick-jibri-installer:split_php_prepare into master 2024-03-21 19:07:16 +00:00
1 changed files with 7 additions and 3 deletions
Showing only changes of commit 55c322e7e0 - Show all commits

View File

@ -96,9 +96,11 @@ do
echo " - Please try again."
fi
done
sleep .1
#Simple DNS test
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"
sleep .1
else
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."
@ -110,7 +112,7 @@ else
exit
fi
fi
sleep .1
NC_NGINX_CONF="/etc/nginx/sites-available/$NC_DOMAIN.conf"
while [ -z "$NC_USER" ]
do
@ -119,6 +121,7 @@ do
echo " - This field is mandatory."
fi
done
sleep .1
while [ -z "$NC_PASS" ] || [ ${#NC_PASS} -lt 8 ]
do
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"
fi
done
sleep .1
#Enable HSTS
while [ "$ENABLE_HSTS" != "yes" ] && [ "$ENABLE_HSTS" != "no" ]
do
@ -138,7 +142,7 @@ do
echo " - HSTS will be enabled."
fi
done
sleep .1
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
>>> 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
#--------------------------------------------------
bash files/prepare_php.sh "$MIN_PHP"
bash tools/prepare_php.sh "$MIN_PHP"
#--------------------------------------------------
# Create DB user