This commit is contained in:
2023-05-24 23:28:27 -05:00
parent 2c059454a5
commit be12ebfd64
2 changed files with 67 additions and 54 deletions

View File

@@ -446,16 +446,23 @@ VIEWSITEINFO(){
cw_spc5=7 cw_spc5=7
cw_spc6=8 cw_spc6=8
cw_spc7=15 cw_spc7=15
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 "${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
echo -e "${idsCL[LightGreen]}Site Information ${idsCL[Default]}" echo -e "${idsCL[LightGreen]}Site Information ${idsCL[Default]}"
if [ "${1}" == "lb" ]; then gosite=${NODE_TYPE}_NGINX_SITES
gosite=${LB_NGINX_SITES}
elif [ "${1}" == "web" ]; then if [ "${!gosite}" != "" ]; then
gosite=${WEB_NGINX_SITES}
else
exit 0
fi
sites=$(find ${gosite}/*); i=0 sites=$(find ${gosite}/*); i=0
for sitefile in ${sites[@]}; do for sitefile in ${sites[@]}; do
site=${sitefile##*/}; site=${site/.conf/} site=${sitefile##*/}; site=${site/.conf/}
@@ -506,6 +513,11 @@ VIEWSITEINFO(){
i=`expr $i + 1` i=`expr $i + 1`
done done
else
echo "No site information found"
fi
echo echo
} }

View File

@@ -1336,6 +1336,7 @@ GUI(){
echo -e " ${idsCL[Yellow]}service${idsCL[Default]} [service] [action] - Manages services accross like nodes" echo -e " ${idsCL[Yellow]}service${idsCL[Default]} [service] [action] - Manages services accross like nodes"
echo -e " ${idsCL[Yellow]}services${idsCL[Default]} - (UI) Manage services accross all nodes" echo -e " ${idsCL[Yellow]}services${idsCL[Default]} - (UI) Manage services accross all nodes"
echo -e " ${idsCL[Yellow]}set-permissions${idsCL[Default]} - Set specific permissions preset for app folders" echo -e " ${idsCL[Yellow]}set-permissions${idsCL[Default]} - Set specific permissions preset for app folders"
echo -e " ${idsCL[Yellow]}siteinfo${idsCL[Default]} - View detailed nginx site info"
echo -e " ${idsCL[Yellow]}status${idsCL[Default]} - Check Status of systems" echo -e " ${idsCL[Yellow]}status${idsCL[Default]} - Check Status of systems"
echo -e " ${idsCL[Yellow]}update${idsCL[Default]} - Update nodemgmt" echo -e " ${idsCL[Yellow]}update${idsCL[Default]} - Update nodemgmt"
echo -e " ${idsCL[Yellow]}update-nodes${idsCL[Default]} - Update nodemgmt on all nodes" echo -e " ${idsCL[Yellow]}update-nodes${idsCL[Default]} - Update nodemgmt on all nodes"