This commit is contained in:
2023-12-17 15:56:20 -06:00
parent 270f69c2fd
commit f1c1af2643
2 changed files with 27 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
VERS='2.5.37-12172023'
VERS='2.5.40-12172023'
noheader=' update service dailytemp confsync '
@@ -69,9 +69,18 @@ fi
# RNIP=$(ip addr show $(ip route | awk '/default/ { print $5 }') | grep "inet" | head -n 1 | awk '/inet/ {print $2}' | cut -d'/' -f1)
SENDNOTICE(){
[ "${PUSHOVER_APP_TOKEN}" != "" ] && PUSH_TO_MOBILE "${2}
if [ "${PUSHOVER_APP_TOKEN}" != "" ]; then
if [ "${TEST_INPUTACV}" != "" ] || [ "${TEST_BATTVOLT}" != "" ]; then
PUSH_TO_MOBILE "***TEST MODE***
${2}
$(date)" "${1}" ${3} &
else
PUSH_TO_MOBILE "${2}
$(date)" "${1}" ${3} &
fi
[ "${EMAIL_NOTICE}" != "" ] && echo -e "${2}\n\n$(date +%Y-%m-%d-%H-%M-%S)" | mail -s "${1}" ${EMAIL_NOTICE}