From 6ba7dd1f1b25dfba870ef63635f6bba7e40974fb Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sat, 2 Dec 2023 14:10:29 -0600 Subject: [PATCH] Update sites.inc --- inc/sites.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/inc/sites.inc b/inc/sites.inc index 5918b462..29575112 100755 --- a/inc/sites.inc +++ b/inc/sites.inc @@ -560,7 +560,11 @@ SITEINFO(){ gosite=${NM_NGINXPATH[${RUN_NODE_TYPE}]}/sites-enabled declare -A SITELIST if [ "${gosite}" != "" ]; then - if [ -f ${gosite}/*${SEARCH,,}*.conf ]; then + gofor=false + [ "${SEARCH}" != "0" ] && [ -f ${gosite}/*${SEARCH,,}*.conf ] && gofor=true + [ "${SEARCH}" == "0" ] && [ -f ${gosite}/*.conf ] && gofor=true + + if [ "${gofor}" == "true" ]; then [ "${SEARCH}" != "0" ] && sites=$(find ${gosite}/*${SEARCH,,}*.conf) || sites=$(find ${gosite}/*.conf) i=1 for sitefile in ${sites[@]}; do