Update offsite-power-check.sh
This commit is contained in:
@@ -36,7 +36,7 @@ PWO_START(){
|
|||||||
TITLE=${1}
|
TITLE=${1}
|
||||||
MESSAGE="${2}
|
MESSAGE="${2}
|
||||||
|
|
||||||
BATTERY CHARGE: ${OFFSITE_BATT_CAP}^
|
BATTERY CHARGE: ${OFFSITE_BATT_CAP}ZZ
|
||||||
BATT RUNTIME: ${OFFSITE_BATT_RUNTIME}'Mins
|
BATT RUNTIME: ${OFFSITE_BATT_RUNTIME}'Mins
|
||||||
AC VOLTAGE: ${OFFSITE_VOLTIN}'Volts
|
AC VOLTAGE: ${OFFSITE_VOLTIN}'Volts
|
||||||
|
|
||||||
@@ -44,7 +44,7 @@ $(date)"
|
|||||||
MSGSOUND=Cosmic
|
MSGSOUND=Cosmic
|
||||||
if [ "${3}" = "1" ]; then PRIORITY="${3}"; MSGSOUND=siren
|
if [ "${3}" = "1" ]; then PRIORITY="${3}"; MSGSOUND=siren
|
||||||
elif [ "${3}" != "" ]; then PRIORITY=${3}; else PRIORITY=0; fi
|
elif [ "${3}" != "" ]; then PRIORITY=${3}; else PRIORITY=0; fi
|
||||||
curl -d "token=${PUSHOVER_APP_TOKEN}&user=${PUSHOVER_USER_TOKEN}&message=$(echo ${MESSAGE} | sed 's/^/HH/g')&title=${TITLE}&priority=${PRIORITY}&sound=${MSGSOUND}" https://api.pushover.net/1/messages.json >/dev/null 2>&1
|
curl -d "token=${PUSHOVER_APP_TOKEN}&user=${PUSHOVER_USER_TOKEN}&message=$(echo "${MESSAGE}" | sed 's/ZZ/HH/g')&title=${TITLE}&priority=${PRIORITY}&sound=${MSGSOUND}" https://api.pushover.net/1/messages.json >/dev/null 2>&1
|
||||||
}
|
}
|
||||||
if [ "${startup}" == "true" ]; then
|
if [ "${startup}" == "true" ]; then
|
||||||
SENDNOTICE "OFFSITE POWER MONITOR" "Service starting"
|
SENDNOTICE "OFFSITE POWER MONITOR" "Service starting"
|
||||||
|
|||||||
Reference in New Issue
Block a user