From 3ae79eeabfee324d779ea93548a177afeec36891 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Fri, 29 Dec 2023 23:24:42 -0600 Subject: [PATCH] update --- defaults.inc | 4 ++-- offsite-power-check.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/defaults.inc b/defaults.inc index 1d8afc9e..88f3b7ef 100755 --- a/defaults.inc +++ b/defaults.inc @@ -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} } diff --git a/offsite-power-check.sh b/offsite-power-check.sh index fd7e50cf..ebb5db15 100755 --- a/offsite-power-check.sh +++ b/offsite-power-check.sh @@ -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}