Update temp.inc.sh

This commit is contained in:
2023-12-26 20:30:35 -06:00
parent c68239193e
commit 029499cba0

View File

@@ -298,7 +298,6 @@ CHECKTEMP_SERVICE(){
declare -A last_temp
echo -e "($(date +'%Y-%m-%d %H:%M:%S')) - 'Check Temp' Service Startup" >> ${PW_LOGFILE}
while true; do
echo starting; start=`date +%s`
source ${PW_FOLDER}/defaults.inc
# time="$(date +%H)$(date +%M)"
@@ -325,7 +324,6 @@ CHECKTEMP_SERVICE(){
[ ${s_count} -eq ${#SENSORS_CHECKED[@]} ] && completed=true
done
echo done
end=`date +%s`; runtime=$((end-start)); echo "Total runtime: ${runtime}s, pausing 10secs ..."
sleep 10s
done # &
${PW_TMPFOLDER}/zservicerun.${SENSORa}.done
@@ -613,6 +611,7 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
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}"
fi
fi
elif [ "${SENSOR}" == "ServerRoomTH" ]; then