Update offsite-power-check.sh
This commit is contained in:
@@ -50,15 +50,12 @@ AC VOLTAGE: ${OFFSITE_VOLTIN}'volts
|
|||||||
|
|
||||||
$(date)"
|
$(date)"
|
||||||
if [ "${3}" = "1" ]; then PRIORITY="${3}"; MSGSOUND=siren; elif [ "${3}" != "" ]; then PRIORITY=${3}; else PRIORITY=0; fi
|
if [ "${3}" = "1" ]; then PRIORITY="${3}"; MSGSOUND=siren; elif [ "${3}" != "" ]; then PRIORITY=${3}; else PRIORITY=0; fi
|
||||||
curl -m 3 -sd "token=${PW_PUSHOVER_APP_TOKEN}&user=${PW_PUSHOVER_USER_TOKEN}&message=${MESSAGE}&title=${1}&priority=${PRIORITY}&sound=cosmic" https://api.pushover.net/1/messages.json ####>/dev/null 2>&1
|
curl -m 3 -sd "token=${PW_PUSHOVER_APP_TOKEN}&user=${PW_PUSHOVER_USER_TOKEN}&message=${MESSAGE//\%/\%25}&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 "STARTING"
|
|
||||||
SENDNOTICE "Test" "Testing 123"
|
|
||||||
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${OFFSITE_VOLTIN}'volts - ${OFFSITE_WATTS}'watts - ${OFFSITE_BATT_CAP}'% Battery - ${OFFSITE_BATT_RUNTIME}'mins - Service startup" >> ${PW_LOGPOWER}
|
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${OFFSITE_VOLTIN}'volts - ${OFFSITE_WATTS}'watts - ${OFFSITE_BATT_CAP}'% Battery - ${OFFSITE_BATT_RUNTIME}'mins - Service startup" >> ${PW_LOGPOWER}
|
||||||
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${OFFSITE_VOLTIN}'volts - ${OFFSITE_BATT_CAP}'% Battery - Service startup" >> ${PW_LOGFILE}
|
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"
|
||||||
echo "sent"
|
|
||||||
startup=false
|
startup=false
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user