Update offsite-power-check.sh
This commit is contained in:
@@ -49,7 +49,7 @@ PWO_START(){
|
|||||||
curl -sd "token=${PUSHOVER_APP_TOKEN}&user=${PUSHOVER_USER_TOKEN}&message=${MESSAGE}&title=${1}&priority=${PRIORITY}&sound=cosmic" https://api.pushover.net/1/messages.json >/dev/null 2>&1
|
curl -sd "token=${PUSHOVER_APP_TOKEN}&user=${PUSHOVER_USER_TOKEN}&message=${MESSAGE}&title=${1}&priority=${PRIORITY}&sound=cosmic" https://api.pushover.net/1/messages.json >/dev/null 2>&1
|
||||||
}
|
}
|
||||||
if [ "${startup}" == "true" ]; then
|
if [ "${startup}" == "true" ]; then
|
||||||
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${OFFSITE_VOLTIN}'Volts - ${OFFSITE_BATT_CAP}% Battery - Service startup" >> ${PW_LOGPOWER}
|
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${OFFSITE_VOLTIN}'Volts - ${OFFSITE_BATT_CAP}% Battery - Service startup" >> ${PW_LOGFILE}
|
||||||
SENDNOTICE "OFFSITE POWER MONITOR" "Service starting"
|
SENDNOTICE "OFFSITE POWER MONITOR" "Service starting"
|
||||||
startup=false
|
startup=false
|
||||||
fi
|
fi
|
||||||
@@ -57,7 +57,7 @@ PWO_START(){
|
|||||||
if [ ${OFFSITE_VOLTIN%.*} -gt 105 ]; then
|
if [ ${OFFSITE_VOLTIN%.*} -gt 105 ]; then
|
||||||
if [ -f ${PW_TMPFOLDER}/power.offsite.ac.low ]; then
|
if [ -f ${PW_TMPFOLDER}/power.offsite.ac.low ]; then
|
||||||
if [ -f ${PW_TMPFOLDER}/power.offsite.off ]; then
|
if [ -f ${PW_TMPFOLDER}/power.offsite.off ]; then
|
||||||
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${OFFSITE_VOLTIN}'Volts - ${OFFSITE_BATT_CAP}% Battery - Offsite Power Restored" >> ${PW_LOGPOWER}
|
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${OFFSITE_VOLTIN}'Volts - ${OFFSITE_BATT_CAP}% Battery - Offsite Power Restored" >> ${PW_LOGFILE}
|
||||||
SENDNOTICE "OFFSITE POWER" "Power restored! Will wait ${WAIT_TO_POWER_SERVERS}'Mins before turning host(s) back on"
|
SENDNOTICE "OFFSITE POWER" "Power restored! Will wait ${WAIT_TO_POWER_SERVERS}'Mins before turning host(s) back on"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user