From 367039603d1d605f016424a3e76860834e78ce78 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Wed, 6 Dec 2023 21:53:41 -0600 Subject: [PATCH] Update status.inc --- inc/status.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/inc/status.inc b/inc/status.inc index 124e0aba..76b6ce96 100755 --- a/inc/status.inc +++ b/inc/status.inc @@ -72,14 +72,15 @@ STATUS(){ lip=${RUN_NODE_IP} echo -e "\n$(DIVIDER)\n${idsCL[Yellow]}${idsST[Bold]} LOCALHOST Service Status${idsST[Reset]}${idsCL[Default]}" echo -e "$(DIVIDER)" - echo -en " ${idsST[Bold]}${idsCL[LightCyan]}${NODE_HOSTNAME} (${lip})${idsST[Reset]}" + echo -en " ${idsST[Bold]}${idsCL[LightCyan]}${NODE_HOSTNAME} ${idsST[Reset]}${idsCL[LightCyan]}[${lip}]" if ([ "${ST_ACTION}" == "report" ] && [ "${2}" == "email" ]) || [ "${ST_ACTION}" != "report" ]; then uptime=`uptime -p` - echo -e "${idsCL[LightCyan]} - ${uptime} - ${idsCL[Yellow]}CPU: `IDS_NUMBER_FORMAT ${cpu_usage} 1`'%${idsCL[Default]}" + echo -e "${idsCL[Yellow]}[CPU: `IDS_NUMBER_FORMAT ${cpu_usage} 1`'%]${idsCL[White]} - ${uptime}${idsCL[Default]}" else echo -e "${idsCL[Default]}" fi DIVIDER . green + fi # if [ "${ST_ACTION}" != "check" ]; then # lip=${RUN_NODE_IP} @@ -444,7 +445,6 @@ STATUS_NODE(){ checkhost=true checkhostssl=ok fi - # echo "HERE: $checkhost - $checkhostssl" if [ "${checkhost}" != "false" ] && [ "${checkhostssl}" == "ok" ]; then [ "${NODETYPE}" != "OFW" ] && cpu_usage=$(ssh -q -o ConnectTimeout=1 -o ConnectionAttempts=1 root@${nip} "/opt/idssys/defaults/get-data.sh cpu-usage") || cpu_usage="" @@ -464,7 +464,7 @@ STATUS_NODE(){ else uptime=$(${NCMD} uptime -p) fi - [ "${ST_ACTION}" != "check" ] && echo -e "\r\033[K ${idsST[Bold]}${idsCL[LightCyan]}${NM_HOSTNAMES[${nip}]}${idsST[Reset]}${idsCL[Yellow]} [${nip}][CPU: `IDS_NUMBER_FORMAT ${cpu_usage} 1`'%]${idsCL[White]} - ${uptime}${idsCL[Default]}" + [ "${ST_ACTION}" != "check" ] && echo -e "\r\033[K ${idsST[Bold]}${idsCL[LightCyan]}${NM_HOSTNAMES[${nip}]}${idsST[Reset]}${idsCL[LightCyan]} [${nip}]${idsCL[Yellow]}[CPU: `IDS_NUMBER_FORMAT ${cpu_usage} 1`'%]${idsCL[White]} - ${uptime}${idsCL[Default]}" else echo -e "${idsCL[Default]}" fi