Update sites.inc

This commit is contained in:
2023-05-25 18:23:22 -05:00
parent 5e61bb0a2c
commit 1c188df340

View File

@@ -466,12 +466,11 @@ SITEINFO(){
fi
gosite=${NODE_TYPE}_NGINX_SITES
declare -A SITELIST
if [ "${!gosite}" != "" ]; then
sites=$(find ${!gosite}/*); i=0
for sitefile in ${sites[@]}; do
site=${sitefile##*/}; site=${site/.conf/}
if (( i % 12 == 0 )) || [ $i = 0 ]; then
DIVIDER false yellow 98
msg1="Site Address"; # c=0; spc1=''; spct=$((${cw_spc1}-${#msg1})); until [ $c = ${spct} ]; do spc1="${spc1} "; c=`expr $c + 1`; done
@@ -483,7 +482,7 @@ SITEINFO(){
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
@@ -515,6 +514,7 @@ SITEINFO(){
# msg6="${lock}"; c=0; spc6=''; spct=$((${cw_spc6}-${#msg6})); until [ $c = ${spct} ]; do spc6="${spc6} "; c=`expr $c + 1`; done
# msg7="${proxyhost}";
i=`expr $i + 1`
SITELIST[${i}]=${site}
[ ${i} -lt 10 ] && ii=" ${i}" || ii=${i}
# echo -e "${ii}) ${msg1}${spc1}${msg2}${spc2}${msg3}${spc3}${msg4}${spc4}${msg5}${spc5}${msg6}${spc6}${msg7}"
@@ -523,11 +523,10 @@ SITEINFO(){
done
if [ "${1}" == "edit" ]; then
echo -en "${idsCL[LightCyan]}Enter the site number you want to edit: ${idsCL[Default]}"
echo -en "\n${idsCL[LightCyan]}Enter the site number you want to edit: ${idsCL[Default]}"
read siteid
site=${sites[`expr $siteid - 1`]##*/}; site=${site/.conf/}
echo $site
# site=${sites[${siteid}]}; site=${site/.conf/}
echo ${sites[${siteid}]}
fi