Update sites.inc

This commit is contained in:
2023-12-02 14:12:34 -06:00
parent 16a9acfcf6
commit 828d74e5bf

View File

@@ -560,12 +560,8 @@ SITEINFO(){
gosite=${NM_NGINXPATH[${RUN_NODE_TYPE}]}/sites-enabled
declare -A SITELIST
if [ "${gosite}" != "" ]; 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)
[ "${SEARCH}" != "0" ] && sites=$(find -s ${gosite}/*${SEARCH,,}*.conf) || sites=$(find -s ${gosite}/*.conf)
if [ "${sites}" != "" ]; then
i=1
for sitefile in ${sites[@]}; do
SITENAME=${sitefile##*/}; SITENAME=${SITENAME/.conf/}