Update temp.inc.sh

This commit is contained in:
2023-12-26 20:35:20 -06:00
parent 3f247d56ae
commit 25656e09f9

View File

@@ -413,7 +413,7 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
fi
[ "${last_temp[${SENSOR//-/}]}" == "" ] && last_temp[${SENSOR//-/}]=0
echo 1
logtemp=${PW_LOGFOLDER}/log-temp-${SENSOR}
if [ "${temp_c}" != "null" ] && [ "${temp_c}" != "" ]; then
if [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "cpu" ]; then
@@ -471,7 +471,7 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
FanSpeed=''
fi
fi
echo 2
if (( $(bc <<< "${temp_f} < ${temp_warn}") )); then
if (( $(bc <<< "${last_temp[${SENSOR//-/}]} > 1") )); then
[ -f ${PW_TMPFOLDER}/${SENSORa}.down ] && [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/${SENSORa}.down)) -ge 1800 ] && SENDNOTICE "${SENSOR} BACK TO NORMAL" "NORMAL TEMP: ${temp_f}${GAUGESH}
@@ -563,6 +563,7 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
fi
fi
fi
echo 3
fi
[ -f ${PW_TMPFOLDER}/${SENSOR}.insert ] && lastinsert=$(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/${SENSOR}.insert)) || lastinsert=100000
@@ -600,7 +601,7 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
# fi
touch ${PW_TMPFOLDER}/${SENSOR}.insert
fi
echo 4
#### LOGGING OF SERVERROOM SENSOR DIFFERENCE
if [ "${SENSOR}" == "ServerRoomLA-Probe" ]; then
# if [ ! -f ${PW_TMPFOLDER}/.log.sr.difference ] || [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.log.sr.difference)) -ge 300 ]; then