This commit is contained in:
2023-12-11 17:01:34 -06:00
parent a57149ea19
commit e3131efc67
2 changed files with 8 additions and 8 deletions

View File

@@ -1,5 +1,5 @@
VERS='2.4.18-12112023' VERS='2.4.19-12112023'
noheader=' update service dailytemp ' noheader=' update service dailytemp '
hc_cw=60 hc_cw=60

View File

@@ -223,7 +223,6 @@ CHECKTEMP_SERVICE(){
for SENSORa in ${PW_SENSOR_ORD[@]}; do for SENSORa in ${PW_SENSOR_ORD[@]}; do
logtemp=${PW_LOGFOLDER}/log-temp-${SENSORa} logtemp=${PW_LOGFOLDER}/log-temp-${SENSORa}
[ ! -f ${logtemp} ] && touch ${logtemp} [ ! -f ${logtemp} ] && touch ${logtemp}
[ ! "${last_temp[${SENSORa}]}"] && last_temp[${SENSORa}]=0
[ $(expr `date +%s` - $(stat -c %Y ${logtemp})) -ge 3600 ] && relog=1 || relog=0 [ $(expr `date +%s` - $(stat -c %Y ${logtemp})) -ge 3600 ] && relog=1 || relog=0
if ([ "${PW_REMOTE_SENSORS[${SENSORa}]}" != "" ] && [ "$(CHECK_HOST ${PW_REMOTE_SENSORS[${SENSORa}]})" != "false" ]) || ([ "${PW_HOST_ADDRESSES[${SENSORa}]}" != "" ] && [ "$(CHECK_HOST ${PW_HOST_ADDRESSES[${SENSORa}]})" != "false" ]); then if ([ "${PW_REMOTE_SENSORS[${SENSORa}]}" != "" ] && [ "$(CHECK_HOST ${PW_REMOTE_SENSORS[${SENSORa}]})" != "false" ]) || ([ "${PW_HOST_ADDRESSES[${SENSORa}]}" != "" ] && [ "$(CHECK_HOST ${PW_HOST_ADDRESSES[${SENSORa}]})" != "false" ]); then
@@ -246,6 +245,7 @@ CHECKTEMP_SERVICE(){
fi fi
if [ "${SENSORS_CHECK}" != "" ]; then if [ "${SENSORS_CHECK}" != "" ]; then
for SENSOR in "${SENSORS_CHECK[@]}"; do for SENSOR in "${SENSORS_CHECK[@]}"; do
[ ! "${last_temp[${SENSOR}]}" ] && last_temp[${SENSOR}]=0
if [ "${PW_THRESHOLDS[${SENSORa}]}" != "" ]; then if [ "${PW_THRESHOLDS[${SENSORa}]}" != "" ]; then
echo ${PW_THRESHOLDS[${SENSORa}]} | cut -d',' -f 1 | read temp_warn echo ${PW_THRESHOLDS[${SENSORa}]} | cut -d',' -f 1 | read temp_warn
echo ${PW_THRESHOLDS[${SENSORa}]} | cut -d',' -f 2 | read temp_crit echo ${PW_THRESHOLDS[${SENSORa}]} | cut -d',' -f 2 | read temp_crit