From 4f99e53915846b82a0411f5f4f5741b5aba54233 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Thu, 25 May 2023 18:15:53 -0500 Subject: [PATCH] Update sites.inc --- inc/sites.inc | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/inc/sites.inc b/inc/sites.inc index 3f5c85df..10b263f4 100755 --- a/inc/sites.inc +++ b/inc/sites.inc @@ -438,8 +438,8 @@ NEWSITE(){ fi } -VIEWSITEINFO(){ - start=`date +%s` +SITEINFO(){ + # start=`date +%s` cw_spc1=30 cw_spc2=10 cw_spc3=7 @@ -459,7 +459,11 @@ VIEWSITEINFO(){ done done - echo -e "${idsCL[LightGreen]}Site Information ${idsCL[Default]}" + if [ "${1}" == "edit" ]; then + echo -e "${idsCL[LightGreen]}Choose a site from the list below to edit: ${idsCL[Default]}" + else + echo -e "${idsCL[LightGreen]}Local NGINX Sites ${idsCL[Default]}" + fi gosite=${NODE_TYPE}_NGINX_SITES @@ -479,7 +483,7 @@ VIEWSITEINFO(){ msg7="Proxy Address & Port"; # echo -e " ${idsST[Bold]}${idsCL[LightCyan]}${msg1}${spc1}${msg2}${spc2}${msg3}${spc3}${msg4}${spc4}${msg5}${spc5}${msg6}${spc6}${msg7}${idsST[Reset]}${idsCL[Default]}" echo -en "${idsST[Bold]}${idsCL[LightCyan]}" - printf "%-30s %-10s %-7s %-7s %-7s %-8s %-15s\n" " ${msg1}" "${msg2}" "${msg3}" "${msg4}" "${msg5}" "${msg6}" "${msg7}" + printf "%-30s %-10s %-7s %-7s %-7s %-8s %-15s\n" "## ${msg1}" "${msg2}" "${msg3}" "${msg4}" "${msg5}" "${msg6}" "${msg7}" echo -en "${idsST[Reset]}${idsCL[Default]}" DIVIDER false yellow 98 else @@ -518,6 +522,15 @@ VIEWSITEINFO(){ done + if [ "${1}" == "edit" ]; then + echo -en "${idsCL[LightCyan]}Enter the site number you want to edit: ${idsCL[Default]}" + read siteid + + site=${sites[`expr $siteid - 1`]##*/}; site=${site/.conf/} + echo $site + + fi + else echo -e "\nNo site information found for this node" @@ -525,11 +538,10 @@ VIEWSITEINFO(){ echo - end=`date +%s` - runtime=$((end-start)) - echo "runtime: ${runtime}" - - echo + # end=`date +%s` + # runtime=$((end-start)) + # echo "runtime: ${runtime}" + # echo } @@ -538,3 +550,4 @@ VIEWSITEINFO(){ +