update
This commit is contained in:
@@ -69,7 +69,7 @@ fi
|
||||
# RNIP=$(ip addr show $(ip route | awk '/default/ { print $5 }') | grep "inet" | head -n 1 | awk '/inet/ {print $2}' | cut -d'/' -f1)
|
||||
|
||||
SENDNOTICE(){
|
||||
if [ "${PUSHOVER_APP_TOKEN}" != "" ]; then
|
||||
if [ "${PW_PUSHOVER_APP_TOKEN}" != "" ]; then
|
||||
if [ "${TEST_INPUTACV}" != "" ] || [ "${TEST_BATTVOLT}" != "" ]; then
|
||||
PUSH_TO_MOBILE "***TEST MODE***
|
||||
|
||||
@@ -82,7 +82,7 @@ $(date)" "${1}" ${3} &
|
||||
$(date)" "${1}" ${3} &
|
||||
fi
|
||||
fi
|
||||
[ "${EMAIL_NOTICE}" != "" ] && echo -e "${2}\n\n$(date +%Y-%m-%d-%H-%M-%S)" | mail -s "${1}" ${EMAIL_NOTICE}
|
||||
[ "${PW_EMAIL_NOTICE}" != "" ] && echo -e "${2}\n\n$(date +%Y-%m-%d-%H-%M-%S)" | mail -s "${1}" ${PW_EMAIL_NOTICE}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ AC VOLTAGE: ${OFFSITE_VOLTIN}'volts
|
||||
|
||||
$(date)"
|
||||
if [ "${3}" = "1" ]; then PRIORITY="${3}"; MSGSOUND=siren; elif [ "${3}" != "" ]; then PRIORITY=${3}; else PRIORITY=0; fi
|
||||
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=${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
|
||||
}
|
||||
if [ "${startup}" == "true" ]; then
|
||||
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}
|
||||
|
||||
Reference in New Issue
Block a user