From 1cba77a00f2e9bdca71879b3a1819eef46d8766c Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sat, 2 Dec 2023 13:52:55 -0600 Subject: [PATCH] Update sites.inc --- inc/sites.inc | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/inc/sites.inc b/inc/sites.inc index ef9bb512..9001773b 100755 --- a/inc/sites.inc +++ b/inc/sites.inc @@ -560,13 +560,10 @@ SITEINFO(){ gosite=${NM_NGINXPATH[${RUN_NODE_TYPE}]}/sites-enabled declare -A SITELIST if [ "${gosite}" != "" ]; then - if [ "${SEARCH}" != "0" ]; then - sites=$(find ${gosite}/*${SEARCH,,}*.conf) - else - sites=$(find ${gosite}/*.conf) - fi + [ "${SEARCH}" != "0" ] && siteslist="${gosite}/*${SEARCH,,}*.conf" || siteslist="${gosite}/*.conf" - if [ "${sites}" != "" ]; then + if [ -f ${siteslist} ]; then + sites=$(find ${siteslist}) i=1 for sitefile in ${sites[@]}; do SITENAME=${sitefile##*/}; SITENAME=${SITENAME/.conf/}