update
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
VERS='2.6.50-02252024'
|
||||
VERS='2.6.52-02262024'
|
||||
|
||||
noheader=' update service dailytemp confsync -r -report '
|
||||
|
||||
|
||||
@@ -83,6 +83,7 @@ CHECKTEMP(){
|
||||
fi
|
||||
DIVIDER . yellow ${PRI_WIDTH}
|
||||
for SENSOR in ${PW_SENSOR_ORD[@]}; do
|
||||
[ "${PW_DESC_TEMP[${SENSOR}]}" != "" ] && SENSOR_DESC=${PW_DESC_TEMP[${SENSOR}]} || SENSOR_DESC=${SENSOR}
|
||||
if [ "${PW_SENSOR_TYPE[${SENSOR}]}" != "esxi" ] && ([ "${search}" == "" ] || [[ "${SENSOR,,}" = *"${search,,}"* ]]) && ([ "${STYPE}" = "" ] || ([ "${STYPE}" = "mainsite" ] && ([ "${PW_REMOTE_SENSORS[${SENSOR}]}" = "" ] || [ "${PW_REMOTE_SENSORS[${SENSOR}]}" = "127.0.0.1" ] || [[ "${PW_REMOTE_SENSORS[${SENSOR}]}" = *"10.10."* ]])) || ([ "${STYPE}" = "offsite" ] && [ "${PW_REMOTE_SENSORS[${SENSOR}]}" != "" ] && [[ "${PW_REMOTE_SENSORS[${SENSOR}]}" = *"10.2.1."* ]])) && ([ "${TTYPE}" != "fans" ] || ([ "${TTYPE}" == "fans" ] && [[ "${SENSOR}" = *"Room"* ]])); then
|
||||
if [ "${PW_THRESHOLDS[${SENSOR}]}" != "" ]; then
|
||||
echo ${PW_THRESHOLDS[${SENSOR}]} | cut -d',' -f 1 | read temp_warn
|
||||
@@ -106,8 +107,8 @@ CHECKTEMP(){
|
||||
fi
|
||||
|
||||
[ "${last_sensor%%-*}" == "${SENSOR%%-*}" ] && [ "${last_sensor}" != "Offsite-ServerRoom" ] && [ "${last_sensor}" != "Powerwall-Switch" ] && echo -en "\033[1A"
|
||||
c=0; spc=''; spc1=`expr ${cw} - ${#SENSOR}`; until [ ${c} = ${spc1} ]; do spc="${spc} "; c=`expr ${c} + 1`; done
|
||||
echo -en "\r\033[K${idsCL[White]}${idsST[Bold]}${SENSOR}${idsST[Reset]}${spc}${idsCL[Default]}: ${idsCL[Yellow]}Pulling data ... "
|
||||
c=0; spc=''; spc1=`expr ${cw} - ${#SENSOR_DESC}`; until [ ${c} = ${spc1} ]; do spc="${spc} "; c=`expr ${c} + 1`; done
|
||||
echo -en "\r\033[K${idsCL[White]}${idsST[Bold]}${SENSOR_DESC}${idsST[Reset]}${spc}${idsCL[Default]}: ${idsCL[Yellow]}Pulling data ... "
|
||||
if [ ! -f ${PW_TMPFOLDER}/${SENSOR}.down ]; then
|
||||
IFS=: read -r temp_f temp_h <<< $(CHECKTEMPSENSOR ${SENSOR}); unset IFS
|
||||
if [ "${temp_f}" != "timeout" ] && [ "${temp_f}" != "offline" ]; then
|
||||
@@ -141,7 +142,7 @@ CHECKTEMP(){
|
||||
fi
|
||||
|
||||
|
||||
echo -en "\r\033[K${idsCL[White]}${idsST[Bold]}${SENSOR}${idsST[Reset]}${spc}${idsCL[Default]}: ${reading}${idsCL[Default]}"
|
||||
echo -en "\r\033[K${idsCL[White]}${idsST[Bold]}${SENSOR_DESC}${idsST[Reset]}${spc}${idsCL[Default]}: ${reading}${idsCL[Default]}"
|
||||
if [ "${avgdays}" != "noavg" ]; then
|
||||
echo -en " / ${idsCL[Yellow]}Calculating ${avgdays_disp} average ... "
|
||||
average=$(AVERAGETEMP ${SENSOR} ${avgdays})
|
||||
@@ -156,7 +157,7 @@ CHECKTEMP(){
|
||||
else
|
||||
averagedisp="${idsCL[Green]}${average_disp}"
|
||||
fi
|
||||
echo -en "\r\033[K${idsCL[White]}${idsST[Bold]}${SENSOR}${idsST[Reset]}${spc}${idsCL[Default]}: ${reading} ${idsCL[Default]}/${spca}${averagedisp}${GAUGESH}"
|
||||
echo -en "\r\033[K${idsCL[White]}${idsST[Bold]}${SENSOR_DESC}${idsST[Reset]}${spc}${idsCL[Default]}: ${reading} ${idsCL[Default]}/${spca}${averagedisp}${GAUGESH}"
|
||||
fi
|
||||
if ([ "${average}" != "" ] || [ "${temp_f}" != "" ]) && [[ "${SENSOR}" != *"FAN"* ]]; then
|
||||
if [ "${average}" != "" ]; then
|
||||
|
||||
Reference in New Issue
Block a user