This commit is contained in:
2023-08-12 10:28:06 -05:00
parent ad6b88f735
commit e66905438c
2 changed files with 3 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
VERS='2.162-08122023'
VERS='2.165-08122023'
noheader=' update service dailytemp '
@@ -42,6 +42,7 @@ SENSOR_TYPE['RaspberryPI-CPU']='system'
SENSOR_TYPE['OctoPI-CPU']='remotesystem'
declare -A REMOTE_SENSORS
REMOTE_SENSORS['ServerRoomTH']='10.10.20.10'
REMOTE_SENSORS['OctoPI-CPU']='10.10.1.80'
declare -A SENSOR_ID

View File

@@ -120,7 +120,7 @@ CHECKTEMP_SERVICE(){
errtime=$(expr `date +%s` - $(stat -c %Y ${logtemp}))
[ $errtime -ge 3600 ] && relog=1 || relog=0
if [ "$(CHECK_HOST ${REMOTE_SENSORS[${1}]})" != "false" ]; then
if [ "${REMOTE_SENSORS[${1}]}" == "" ] || ([ "${REMOTE_SENSORS[${1}]}" != "" ] && [ "$(CHECK_HOST ${REMOTE_SENSORS[${1}]})" != "false" ]); then
if [ -f ${TMPFOLDER}/${SENSOR}.down ]; then
SENDNOTICE "${SENSOR} Online" "${SENSOR} is back online"
echo "($datetime) - ${SENSOR} - ${SENSOR} is back onlione" >> ${logtemp}