diff --git a/setup.sh b/setup.sh index d4acb21..7ac0da8 100644 --- a/setup.sh +++ b/setup.sh @@ -346,6 +346,54 @@ while true; do done +### PHP-FPM related options +# get PHP-FPM usage status +while true; do + read -p "Are you using PHP-FPM? (default: YES) " yn + case $yn in + [Yy]*|'') + usePHP=1 + break + ;; + [Nn]*) + usePHP=0 + break + ;; + [Xx]*) + echo -e "\n${cyan}---exiting---\n${norm}" + exit 1 + ;; + *) + echo -e "\n${err}Please answer (Y)es, (N)o, e(X)it or accept default${norm}" + ;; + esac +done + +# get PHP-FPM version +if [ "${usePHP}" -eq 1 ]; then + while true; do + read -p "What version of PHP-FPM are you using? (default: 7.2) " inputPHPVersion + case $inputPHPVersion in + [[:digit:]]*|+[[:digit:]]*.[[:digit:]]*) + phpVersion="$inputPHPVersion" + break + ;; + '') + phpVersion=7.2 + break + ;; + [Xx]*) + echo -e "\n${cyan}---exiting---\n${norm}" + exit 1 + ;; + *) + echo -e "\n${err}That does not seem to be a valid version number${norm}" + ;; + esac + done +fi + + # debug section echo -e "\n${mag}---------------------${norm}" echo "Local IP4: $IP4"