Update offsite-power-check.sh
This commit is contained in:
@@ -134,7 +134,7 @@ $(date)"
|
|||||||
if [ ! -f ${PW_TMPFOLDER}/power.ups.losscomm ]; then
|
if [ ! -f ${PW_TMPFOLDER}/power.ups.losscomm ]; then
|
||||||
touch ${PW_TMPFOLDER}/power.ups.losscomm
|
touch ${PW_TMPFOLDER}/power.ups.losscomm
|
||||||
|
|
||||||
elif [ $(expr `date +%s` - $(stat -f %m ${PW_TMPFOLDER}/power.ups.losscomm)) -ge 60 ]; then
|
elif [ $(expr `date +%s` - $(stat -f %m ${PW_TMPFOLDER}/power.ups.losscomm)) -ge 120 ]; then
|
||||||
echo "($(date +'%Y-%m-%d %H:%M:%S')) - 0.0'volts - 0'% Battery - Restarting NUT service" >> ${PW_LOGFILE}
|
echo "($(date +'%Y-%m-%d %H:%M:%S')) - 0.0'volts - 0'% Battery - Restarting NUT service" >> ${PW_LOGFILE}
|
||||||
SENDNOTICE "NUT DRIVER FAILURE" "Restarting NUT service"
|
SENDNOTICE "NUT DRIVER FAILURE" "Restarting NUT service"
|
||||||
/usr/local/etc/rc.d/nut.sh restart
|
/usr/local/etc/rc.d/nut.sh restart
|
||||||
|
|||||||
Reference in New Issue
Block a user