From 0e67c84a8d328768fcffaae4e3231b37145aaea6 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Wed, 24 May 2023 22:47:30 -0500 Subject: [PATCH] Update sites.inc --- inc/sites.inc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/inc/sites.inc b/inc/sites.inc index 15ad9bae..67eb365b 100755 --- a/inc/sites.inc +++ b/inc/sites.inc @@ -462,11 +462,13 @@ VIEWSITEINFO(){ for sitefile in ${sites[@]}; do site=${sitefile##*/}; site=${site/.conf/} - [ grep -q "include/proxy.conf" "${sitefile}" ] && type='Proxy' || type='HTTP' - [ grep -q "ssl_certificate" "${sitefile}" ] && ssl='Yes' || ssl='' - [ grep -q "include/hsts-support.conf" "${sitefile}" ] && hsts='Yes' || hsts='' - [ grep -q "include/websocket-support.conf" "${sitefile}" ] && wbskt='Yes' || wbskt='' - [ grep -q "include/secure-access.conf" "${sitefile}" ] && lock='Yes' || lock='' + + + [ "$(grep include/proxy.conf ${sitefile})" != "" ] && type='Proxy' || type='HTTP' + [ "$(grep ssl_certificate ${sitefile})" != "" ] && ssl='Yes' || ssl='' + [ "$(grep include/hsts-support.conf ${sitefile})" != "" ] && hsts='Yes' || hsts='' + [ "$(grep include/websocket-support.conf ${sitefile})" != "" ] && wbskt='Yes' || wbskt='' + [ "$(grep include/secure-access.conf ${sitefile})" != "" ] && lock='Yes' || lock='' msg1="${site}"; c=0; spc1=''; spct=$((${cw_spc1}-${#msg1})); until [ $c = ${spct} ]; do spc1="${spc1} "; c=`expr $c + 1`; done msg2="${type}"; c=0; spc2=''; spct=$((${cw_spc2}-${#msg2})); until [ $c = ${spct} ]; do spc2="${spc2} "; c=`expr $c + 1`; done