Update temp.inc.sh

This commit is contained in:
2024-01-01 11:53:03 -06:00
parent ea914675c5
commit 5ee8794527

View File

@@ -288,7 +288,6 @@ CHECKTEMP_SERVICE(){
# fi
SENSORS_CHECKED=()
for SENSORa in ${PW_SENSOR_ORD[@]}; do
touch ${PW_TMPFOLDER}/ztemprun.${SENSORa}.running
until [ $(ls ${PW_TMPFOLDER}/ztemprun.*.running 2>/dev/null | wc -l) -lt 1 ]; do
tmp=tmp
done
@@ -318,6 +317,8 @@ CHECKTEMP_SERVICE(){
CHECKTEMP_SERVICE_RUNSENSOR(){
SENSORa=${1}
logtemp=${PW_LOGFOLDER}/log-temp-${SENSORa}
touch ${PW_TMPFOLDER}/ztemprun.${SENSORa}.running
[ ! -f ${logtemp} ] && touch ${logtemp}
[ -f ${PW_TMPFOLDER}/ztemprun.${SENSORa}.done ] && rm -f ${PW_TMPFOLDER}/ztemprun.${SENSORa}.done
[ $(expr `date +%s` - $(stat -c %Y ${logtemp})) -ge $(echo "scale=0; ${PW_LOG_INTERVAL_NORMAL}*60" | bc) ] && relog=1 || relog=0