From ac6787212285918ed0bf399c39716b20a0c9aa91 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sat, 24 Feb 2024 11:46:15 -0600 Subject: [PATCH] update --- defaults.inc | 2 +- inc/temp.inc.sh | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/defaults.inc b/defaults.inc index 9109a75e..e93dfd75 100755 --- a/defaults.inc +++ b/defaults.inc @@ -1,6 +1,6 @@ #!/usr/bin/env bash -VERS='2.6.40-02262024' +VERS='2.6.45-02462024' noheader=' update service dailytemp confsync -r -report ' diff --git a/inc/temp.inc.sh b/inc/temp.inc.sh index d5804a68..09141e99 100644 --- a/inc/temp.inc.sh +++ b/inc/temp.inc.sh @@ -69,6 +69,7 @@ CHECKTEMP(){ elif [[ "${avgdays}" =~ ^[0-9]+$ ]]; then avgdays_disp="${avgdays}Day" fi + c=0; spchdr=''; spc1=`expr 10 - ${#avgdays_disp}`; until [ ${c} = ${spc1} ]; do spchdr="${spchdr} "; c=`expr ${c} + 1`; done else avgdays=noavg fi @@ -76,7 +77,7 @@ CHECKTEMP(){ if [ "${TTYPE}" != "esxi" ]; then DIVIDER . yellow ${PRI_WIDTH} if [ "${avgdays}" != "noavg" ]; then - echo -e "${idsCL[LightYellow]}SENSOR TEMPERATURE(S) Current / ${idsCL[LightYellow]}${avgdays_disp}AVG ${idsCL[Yellow]}warning${idsCL[Default]} / ${idsCL[LightRed]}critical${idsCL[Default]}" + echo -e "${idsCL[LightYellow]}SENSOR TEMPERATURE(S) Current / ${idsCL[LightYellow]}${avgdays_disp}AVG${spchdr}${idsCL[Yellow]}warning${idsCL[Default]} / ${idsCL[LightRed]}critical${idsCL[Default]}" else echo -e "${idsCL[LightYellow]}SENSOR TEMPERATURE(S) Current ${idsCL[Yellow]}warning${idsCL[Default]} / ${idsCL[LightRed]}critical${idsCL[Default]}" fi @@ -177,7 +178,7 @@ CHECKTEMP(){ GAUGESH="°F" DIVIDER . yellow ${PRI_WIDTH} if [ "${avgdays}" != "noavg" ]; then - echo -e "${idsCL[LightYellow]}ESXI HOST TEMPERATURE(S) Current / ${idsCL[LightYellow]}${avgdays_disp}AVG ${idsCL[Yellow]}warning${idsCL[Default]} / ${idsCL[LightRed]}critical${idsCL[Default]}" + echo -e "${idsCL[LightYellow]}ESXI HOST TEMPERATURE(S) Current / ${idsCL[LightYellow]}${avgdays_disp}AVG${spchdr}${idsCL[Yellow]}warning${idsCL[Default]} / ${idsCL[LightRed]}critical${idsCL[Default]}" else echo -e "${idsCL[LightYellow]}ESXI HOST TEMPERATURE(S) Current ${idsCL[Yellow]}warning${idsCL[Default]} / ${idsCL[LightRed]}critical${idsCL[Default]}" fi