diff --git a/inc/temp.inc.sh b/inc/temp.inc.sh index c6c559d6..25cdfadb 100644 --- a/inc/temp.inc.sh +++ b/inc/temp.inc.sh @@ -1245,7 +1245,8 @@ Previous Temp: ${last_temp}${GAUGESH}" if [ ! -f ${PW_TMPFOLDER}/temp.critsys.${SENSOR}.pre ]; then touch ${PW_TMPFOLDER}/temp.critsys.${SENSOR}.pre - elif [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/temp.critsys.${SENSOR}.pre)) -ge 120 ]; then + //elif [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/temp.critsys.${SENSOR}.pre)) -ge 120 ] || [ ${temp_diff} > 1 ]; then + elif [ ! -f ${PW_TMPFOLDER}/temp.critsys.${SENSOR} ] || [ ${temp_diff} > 1 ]; then # if (( $(bc <<< "${temp_diff} >= 1") )); then touch ${PW_TMPFOLDER}/temp.critsys.${SENSOR}.pre SENDNOTICE "${SENSOR_DESC} TEMP CRITICAL" "SYSTEM CRITICAL ${GAUGE}: ${temp_f}${GAUGESH} - (Difference of ${temp_diff}${GAUGESH})" 1