update
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
VERS='2.7.89-08212024'
|
||||
VERS='2.7.90-08222024'
|
||||
|
||||
noheader=' update service dailytemp confsync -r -report test '
|
||||
|
||||
@@ -27,11 +27,13 @@ PW_LOGPOWER=${PW_LOGFOLDER}/log-power
|
||||
M_SRVCOPT=(start stop restart reload enable disable)
|
||||
|
||||
source ${PW_FOLDER}/settings.conf
|
||||
|
||||
EMAIL_NOTICE=${PW_EMAIL_NOTICE}
|
||||
PUSHOVER_APP_TOKEN=${PW_PUSHOVER_APP_TOKEN}
|
||||
PUSHOVER_USER_TOKEN=${PW_PUSHOVER_USER_TOKEN}
|
||||
|
||||
PW_FANINPUT=/sys/class/hwmon/hwmon3/fan1_input
|
||||
[ "${PW_ENABLE_RENOTIFY}" == "" ] && PW_ENABLE_RENOTIFY=1
|
||||
|
||||
mqtt_conn="/usr/bin/mosquitto_sub -h 127.0.0.1 -u ${PW_MQTT_USER} -P ${PW_MQTT_PASS}"
|
||||
# mysql_conn="/usr/bin/mysql -h ${PW_MYSQL_HOST} -P 6033 --user=${PW_MYSQL_USER} --password=${PW_MYSQL_PASS}"
|
||||
|
||||
@@ -1281,9 +1281,11 @@ Previous Temp: ${last_temp}${GAUGESH}"
|
||||
if [ ! -f ${PW_TMPFOLDER}/${SENSOR}-error.reading ]; then
|
||||
touch ${PW_TMPFOLDER}/${SENSOR}-error.reading
|
||||
elif [ ! -f ${PW_TMPFOLDER}/${SENSOR}.disable ] && (([ ! -f ${PW_TMPFOLDER}/${SENSOR}-error.sent ] && [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/${SENSOR}-error.reading)) -ge 60 ]) || ([ -f ${PW_TMPFOLDER}/${SENSOR}-error.sent ] && [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/${SENSOR}-error.sent)) -ge $(echo "scale=0; ${PW_RENOTIFY_TIMEOUT}*60" | bc) ])); then
|
||||
touch ${PW_TMPFOLDER}/${SENSOR}-error.sent
|
||||
SENDNOTICE "${SENSOR} Sensor ERROR" "ERROR reading sensor data" 1
|
||||
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${SENSOR} Sensor - ERROR reading sensor data" >> ${logtemp}
|
||||
if [ ${PW_ENABLE_RENOTIFY} -eq 1 ] || [ ! -f ${PW_TMPFOLDER}/${SENSOR}-error.sent ]; then
|
||||
SENDNOTICE "${SENSOR} Sensor ERROR" "ERROR reading sensor data" 1
|
||||
touch ${PW_TMPFOLDER}/${SENSOR}-error.sent
|
||||
fi
|
||||
fi
|
||||
QRY=""
|
||||
|
||||
@@ -1347,10 +1349,11 @@ Previous Temp: ${last_temp}${GAUGESH}"
|
||||
# fi
|
||||
|
||||
elif [ ! -f ${PW_TMPFOLDER}/${SENSOR}-error.sent ] || ([ -f ${PW_TMPFOLDER}/${SENSOR}-error.sent ] && [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/${SENSOR}-error.sent)) -ge $(echo "scale=0; ${PW_RENOTIFY_TIMEOUT}*60" | bc) ]); then
|
||||
touch ${PW_TMPFOLDER}/${SENSOR}-error.sent
|
||||
SENDNOTICE "${SENSOR} Sensor ERROR" "ERROR reading sensor data" 1
|
||||
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${SENSOR} Sensor - ERROR reading sensor data" >> ${logtemp}
|
||||
|
||||
if [ ${PW_ENABLE_RENOTIFY} -eq 1 ] || [ ! -f ${PW_TMPFOLDER}/${SENSOR}-error.sent ]; then
|
||||
SENDNOTICE "${SENSOR} Sensor ERROR" "ERROR reading sensor data" 1
|
||||
touch ${PW_TMPFOLDER}/${SENSOR}-error.sent
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -1386,9 +1389,11 @@ Previous Temp: ${last_temp}${GAUGESH}"
|
||||
if [ ! -f ${PW_TMPFOLDER}/${SENSORa}-error.reading ]; then
|
||||
touch ${PW_TMPFOLDER}/${SENSORa}-error.reading
|
||||
elif [ ! -f ${PW_TMPFOLDER}/${SENSORa}.disable ] && (([ ! -f ${PW_TMPFOLDER}/${SENSORa}-error.sent ] && [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/${SENSORa}-error.reading)) -ge 60 ]) || ([ -f ${PW_TMPFOLDER}/${SENSORa}-error.sent ] && [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/${SENSORa}-error.sent)) -ge $(echo "scale=0; ${PW_RENOTIFY_TIMEOUT}*60" | bc) ])); then
|
||||
touch ${PW_TMPFOLDER}/${SENSORa}-error.sent
|
||||
SENDNOTICE "${SENSORa} Sensor ERROR" "ERROR reading sensor data" 1
|
||||
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${SENSORa} Sensor - ERROR reading sensor data" >> ${logtemp}
|
||||
if [ ${PW_ENABLE_RENOTIFY} -eq 1 ] || [ ! -f ${PW_TMPFOLDER}/${SENSORa}-error.sent ]; then
|
||||
SENDNOTICE "${SENSORa} Sensor ERROR" "ERROR reading sensor data" 1
|
||||
touch ${PW_TMPFOLDER}/${SENSORa}-error.sent
|
||||
fi
|
||||
elif [ -f ${PW_TMPFOLDER}/.lastfancheck/${SENSORa}.set ] && [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "esxi" ] && [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.lastfancheck/${SENSORa}.set)) -ge 900 ]; then
|
||||
rm -f ${PW_TMPFOLDER}/.lastfancheck/${SENSORa}.set
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user