This commit is contained in:
2023-07-04 17:28:01 -05:00
parent 88d9592084
commit 4954838946
3 changed files with 36 additions and 77 deletions

View File

@@ -510,17 +510,6 @@ SITEINFO(){
cw_spc6=8
cw_spc7=15
dl=110
MIP=$(ip addr show $(ip route | awk '/default/ { print $5 }') | grep "inet" | head -n 1 | awk '/inet/ {print $2}' | cut -d'/' -f1)
for NTYPE in "${NM_NODE_TYPES[@]}"; do
var=${NTYPE}_HOSTS[@]
NODE_TYPE=""
for nip in "${!var}"; do
if [[ "${MIP}" == *"${nip}"* ]]; then
NODE_TYPE=${NTYPE};
break 2
fi
done
done
if [ "${1}" == "edit" ]; then
[ "${2}" == "" ] && echo -e "${idsCL[LightGreen]}Choose a site from the list below to edit: ${idsCL[Default]}"
@@ -528,7 +517,7 @@ SITEINFO(){
echo -e "${idsCL[LightGreen]}Local NGINX Sites ${idsCL[Default]}"
fi
gosite=${NODE_TYPE}_NGINX_SITES
gosite=${RUN_NODE_TYPE}_NGINX_SITES
declare -A SITELIST
if [ "${!gosite}" != "" ]; then
sites=$(find ${!gosite}/*); i=0