From 3f03c1ca7f9d8d5b864bfbded9daea88243ef5ae Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Wed, 24 May 2023 22:56:36 -0500 Subject: [PATCH] Update sites.inc --- inc/sites.inc | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/inc/sites.inc b/inc/sites.inc index c04347dc..3f41c155 100755 --- a/inc/sites.inc +++ b/inc/sites.inc @@ -447,21 +447,24 @@ VIEWSITEINFO(){ cw_spc6=7 echo -e "${idsCL[LightGreen]}Site Information ${idsCL[Default]}" - DIVIDER false yellow 80 - msg1="Site Address"; 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 - msg3="SSL"; c=0; spc3=''; spct=$((${cw_spc3}-${#msg3})); until [ $c = ${spct} ]; do spc3="${spc3} "; c=`expr $c + 1`; done - msg4="HSTS"; c=0; spc4=''; spct=$((${cw_spc4}-${#msg4})); until [ $c = ${spct} ]; do spc4="${spc4} "; c=`expr $c + 1`; done - msg5="WBSKT"; c=0; spc5=''; spct=$((${cw_spc5}-${#msg5})); until [ $c = ${spct} ]; do spc5="${spc5} "; c=`expr $c + 1`; done - msg6="LOCK"; c=0; spc6=''; spct=$((${cw_spc6}-${#msg6})); until [ $c = ${spct} ]; do spc6="${spc6} "; c=`expr $c + 1`; done - msg7="Proxy Host"; - echo -e "${idsST[Bold]}${idsCL[LightCyan]}${msg1}${spc1}${msg2}${spc2}${msg3}${spc3}${msg4}${spc4}${msg5}${spc5}${msg6}${spc6}${msg7}${idsST[Reset]}${idsCL[Default]}" - DIVIDER false yellow 80 - sites=$(find ${LB_NGINX_SITES}/*) + sites=$(find ${LB_NGINX_SITES}/*); i=0 for sitefile in ${sites[@]}; do site=${sitefile##*/}; site=${site/.conf/} + if (( count % 2 == 0 )) || [ $i = 0 ]; then + DIVIDER false yellow 80 + msg1="Site Address"; 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 + msg3="SSL"; c=0; spc3=''; spct=$((${cw_spc3}-${#msg3})); until [ $c = ${spct} ]; do spc3="${spc3} "; c=`expr $c + 1`; done + msg4="HSTS"; c=0; spc4=''; spct=$((${cw_spc4}-${#msg4})); until [ $c = ${spct} ]; do spc4="${spc4} "; c=`expr $c + 1`; done + msg5="WBSKT"; c=0; spc5=''; spct=$((${cw_spc5}-${#msg5})); until [ $c = ${spct} ]; do spc5="${spc5} "; c=`expr $c + 1`; done + msg6="LOCK"; c=0; spc6=''; spct=$((${cw_spc6}-${#msg6})); until [ $c = ${spct} ]; do spc6="${spc6} "; c=`expr $c + 1`; done + msg7="Proxy Host"; + echo -e "${idsST[Bold]}${idsCL[LightCyan]}${msg1}${spc1}${msg2}${spc2}${msg3}${spc3}${msg4}${spc4}${msg5}${spc5}${msg6}${spc6}${msg7}${idsST[Reset]}${idsCL[Default]}" + DIVIDER false yellow 80 + fi + [ "$(grep include/proxy.conf ${sitefile})" != "" ] && type='Proxy' || type='HTTP' [ "$(grep ssl_certificate ${sitefile})" != "" ] && ssl='Yes' || ssl='' @@ -479,6 +482,8 @@ VIEWSITEINFO(){ echo -e "${msg1}${spc1}${msg2}${spc2}${msg3}${spc3}${msg4}${spc4}${msg5}${spc5}${msg6}${spc6}${msg7}" DIVIDER false darkGray 80 + + i=`expr $i + 1` done }