diff --git a/defaults.inc b/defaults.inc index 6b8bc972..23d5ee80 100755 --- a/defaults.inc +++ b/defaults.inc @@ -1,6 +1,6 @@ #!/usr/bin/env bash -VERS='2.8.11-12012024' +VERS='2.8.12-12012024' noheader=' update service dailytemp confsync -r -report test ' diff --git a/inc/power.inc.sh b/inc/power.inc.sh index 7e5852bd..a92c79bc 100644 --- a/inc/power.inc.sh +++ b/inc/power.inc.sh @@ -871,7 +871,7 @@ OFFSITE_CHECKPOWER_SERVICE(){ # upsinfo=$(upsc offsite-ups) upsinfo=$(upsc offsite-ups 2>&1) if [ "$(echo "${upsinfo}" | grep 'input.voltage:' | sed 's/.*: //')" != "" ]; then - rm -f ${PW_TMPFOLDER}/power.ups.losscomm + rm -f ${PW_TMPFOLDER}/power.offsite.ups.losscomm OFFSITE_VOLTIN=$(echo "${upsinfo}" | grep 'input.voltage:' | sed 's/.*: //') OFFSITE_LOAD=$(echo "${upsinfo}" | grep 'ups.load:' | sed 's/.*: //') OFFSITE_LOAD=`echo "scale=2; ${OFFSITE_LOAD}/100" | bc` @@ -995,14 +995,14 @@ AMBIENT TEMP: ${OFFSITE_TEMP}'F" fi else - if [ ! -f ${PW_TMPFOLDER}/power.ups.losscomm ]; then - touch ${PW_TMPFOLDER}/power.ups.losscomm + if [ ! -f ${PW_TMPFOLDER}/power.offsite.ups.losscomm ]; then + touch ${PW_TMPFOLDER}/power.offsite.ups.losscomm - elif [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/power.ups.losscomm)) -ge 120 ]; then + elif [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/power.offsite.ups.losscomm)) -ge 120 ]; then echo "($(date +'%Y-%m-%d %H:%M:%S')) - 0.0'volts - 0'% Battery - Restarting NUT service" >> ${PW_LOGFILE} service nut-driver restart sleep 10s - touch ${PW_TMPFOLDER}/power.ups.losscomm + touch ${PW_TMPFOLDER}/power.offsite.ups.losscomm fi fi