This commit is contained in:
2023-11-23 23:15:55 -06:00
parent e8a524c4dc
commit 40217631e2
2 changed files with 4 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
VERS='2.3.231-11172023' VERS='2.3.232-11232023'
noheader=' update service dailytemp ' noheader=' update service dailytemp '
@@ -150,8 +150,8 @@ unset IFS
SENDNOTICE(){ SENDNOTICE(){
[ "${PUSHOVER_APP_TOKEN}" != "" ] && PUSH_TO_MOBILE "${2} [ "${PUSHOVER_APP_TOKEN}" != "" ] && PUSH_TO_MOBILE "${2}
$(date)" "${1}" ${3} & "$(date +%Y-%m-%d-%H-%M-%S)" "${1}" ${3} &
[ "${EMAIL_NOTICE}" != "" ] && echo -e "${2}\n\n$(date)" | mail -s "${1}" ${EMAIL_NOTICE} [ "${EMAIL_NOTICE}" != "" ] && echo -e "${2}\n\n"$(date +%Y-%m-%d-%H-%M-%S)" | mail -s "${1}" ${EMAIL_NOTICE}
} }

View File

@@ -55,9 +55,7 @@ PWO_START(){
BATTERY CHARGE: ${OFFSITE_BATT_CAP}%25 BATTERY CHARGE: ${OFFSITE_BATT_CAP}%25
BATT RUNTIME: ${OFFSITE_BATT_RUNTIME}'mins BATT RUNTIME: ${OFFSITE_BATT_RUNTIME}'mins
AC VOLTAGE: ${OFFSITE_VOLTIN}'volts AC VOLTAGE: ${OFFSITE_VOLTIN}'volts"
$(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 -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
} }