diff --git a/inc/temp.inc.sh b/inc/temp.inc.sh index 82d6c553..c9110c3f 100644 --- a/inc/temp.inc.sh +++ b/inc/temp.inc.sh @@ -335,7 +335,7 @@ CHECKTEMP_SERVICE(){ done [ ${s_count} -eq ${#SENSORS_CHECKED[@]} ] && completed=true if [ $(($(date +%s)-scanstart)) -gt 300 ]; then - SENDNOTICE "PW Scan Stuck" "NMG Status scan has been running for 5mins, try breaking...." 1 + SENDNOTICE "PW Scan Stuck" "PW Temp scan has been running for 5mins, try breaking...." 1 break fi done @@ -623,16 +623,24 @@ CHECKTEMP_SERVICE_RUNSENSOR(){ #### 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 + echo -en "PRobe found - " + if [ ! -f ${PW_TMPFOLDER}/.log.sr.difference ] || [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.log.sr.difference)) -ge 300 ]; then + echo -en "logs good - " if [ "${temp_f}" != "" ] && [ "${ServerRoomTH}" != "" ]; then + echo -en "temp good" [ ! -f ${PW_TMPFOLDER}/.log.sr.difference ] && touch ${PW_TMPFOLDER}/.log.sr.difference temp_difference=$(bc <<< "scale=2; ${ServerRoomTH}-${temp_f}") # (( $(bc <<<"${temp_difference} < 0") )) && temp_difference=`echo "scale=2; ${temp_difference} * -1" | bc` # echo "$(date "+%Y-%m-%d %H:%M:%S")~${temp_difference}" >> ${PW_TMPFOLDER}/.log.sr.difference echo "[$(date +'%Y-%m-%d %H:%M:%S')] ${temp_f} - ${ServerRoomTH} = ${temp_difference}" + else + echo "temp not good" fi - # fi + else + echo "logs not good" + fi elif [ "${SENSOR}" == "ServerRoomTH" ]; then + echo "srth found" export ServerRoomTH=${temp_f} fi ###################