Update status.inc

This commit is contained in:
2023-05-22 22:30:52 -05:00
parent dc16515ef1
commit 0124d92f82

View File

@@ -45,12 +45,15 @@ STATUS(){
if [ ! -z ${LOCAL_SERVICES+x} ]; then
if [ "${ST_ACTION}" != "check" ]; then
lip=$(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1)
uptime=`uptime -p`
# echo
# DIVIDER
echo -e "\n$(DIVIDER)\n${idsCL[Yellow]} Local Server Status: ${idsST[Bold]}${NODE_HOSTNAME}${idsST[Reset]}${idsCL[Yellow]} - ${uptime}${idsCL[Default]}"
# DIVIDER
echo -e "$(DIVIDER)\n ${idsCL[LightCyan]}${uptime}${idsCL[Default]}\n"
echo -e "\n$(DIVIDER)\n${idsCL[Yellow]}${idsST[Bold]} LOCAL Service Status${idsST[Reset]}${idsCL[Default]}"
echo -e "$(DIVIDER)\n"
echo -en " ${idsST[Bold]}${idsCL[LightCyan]}${NODE_HOSTNAME} (${lip})${idsST[Reset]}"
if ([ "${ST_ACTION}" == "report" ] && [ "${2}" == "email" ]) || [ "${ST_ACTION}" != "report" ]; then
uptime=`uptime -p`
echo -e "${idsCL[LightCyan]} - ${uptime} ${idsCL[LightYello]}${LH}${idsCL[Default]}"
else
echo -e "${idsCL[Default]}"
fi
fi
# if [ "${ST_ACTION}" != "check" ]; then
# lip=$(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1)