From f22c7f4c803e400d69b60b64f8ff93a61e9d76c2 Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Sat, 5 Jan 2019 03:51:28 -0700 Subject: [PATCH] hide phpType is not using PHP --- setup.sh | 48 +++++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/setup.sh b/setup.sh index fef2fad..2794776 100644 --- a/setup.sh +++ b/setup.sh @@ -480,29 +480,31 @@ if [ "${usePHP}" -eq 1 ]; then fi # get PHP-FPM TCP or Sockets configuration -echo -e "\n${mag}PHP-FPM can be set up to respond to requests via TCP or via UNIX sockets." -echo "If you have no idea what any of this means, then you're probably using the" -echo -e "default setup which is sockets${norm}\n" -while true; do - read -p "Is your PHP-FPM setup to listen via 'TCP' or 'sockets'? (default: sockets) " inputPHPType - case "${inputPHPType}" in - [Ss][Oo][Cc][Kk][Ee][Tt][Ss]*|'') - phpType='sockets' - break - ;; - [Tt][Cc][Pp]*) - phpType='tcp' - break - ;; - [Xx]*) - echo -e "\n${cyan}---exiting---\n${norm}" - exit 1 - ;; - *) - echo -e "\n${err}Please enter either 'tcp' or 'sockets' or 'X' to exit script${norm}" - ;; - esac -done +if [ "${usePHP}" -eq 1 ]; then + echo -e "\n${mag}PHP-FPM can be set up to respond to requests via TCP or via UNIX sockets." + echo "If you have no idea what any of this means, then you're probably using the" + echo -e "default setup which is sockets${norm}\n" + while true; do + read -p "Is your PHP-FPM setup to listen via 'TCP' or 'sockets'? (default: sockets) " inputPHPType + case "${inputPHPType}" in + [Ss][Oo][Cc][Kk][Ee][Tt][Ss]*|'') + phpType='sockets' + break + ;; + [Tt][Cc][Pp]*) + phpType='tcp' + break + ;; + [Xx]*) + echo -e "\n${cyan}---exiting---\n${norm}" + exit 1 + ;; + *) + echo -e "\n${err}Please enter either 'tcp' or 'sockets' or 'X' to exit script${norm}" + ;; + esac + done +fi : <<'COMMENTSECTION'