Update temp.inc.sh

This commit is contained in:
2025-06-03 16:58:51 -05:00
parent 1297cf2396
commit 402068e044

View File

@@ -876,6 +876,7 @@ CHECKTEMP_SERVICE(){
for sensor in ${PW_TMPFOLDER}/ztemprun.*.done; do
tsensor=$(grep -oP '(?<=ztemprun.).*?(?=.done)' <<< "${sensor}")
if [ "${tsensor}" != "*" ]; then
echo "sensor: ${tsensor}"
rm -f ${sensor}
((s_count++))
if [ -f ${PW_TMPFOLDER}/${tsensor}.down ] && [ -f ${PW_TMPFOLDER}/.lastfancheck/${tsensor}.set ] && [ "${PW_SENSOR_TYPE[${tsensor}]}" == "esxi" ] && [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.lastfancheck/${tsensor}.set)) -ge 900 ]; then
@@ -891,7 +892,7 @@ CHECKTEMP_SERVICE(){
fi
done
end=`date +%s`; runtime=$((end-start))
# echo -e "script runtime: ${runtime}s"; [ ${runtime} -lt ${runEvery} ] && echo "Sleeping for $((runEvery-runtime))s"
echo -e "script runtime: ${runtime}s"; [ ${runtime} -lt ${runEvery} ] && echo "Sleeping for $((runEvery-runtime))s"
echo "${log_start}~${runtime}~temp" >> ${PW_LOGFOLDER}/service.scantimes
[ ${runtime} -lt ${runEvery} ] && sleep $((runEvery-runtime))s
done # &