From 9f4b6964b0ec88c3829a1321a6d954ae33f84551 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sat, 18 Mar 2023 22:12:20 -0500 Subject: [PATCH] Update default.inc --- default.inc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/default.inc b/default.inc index 6c83b12..9738f63 100755 --- a/default.inc +++ b/default.inc @@ -183,6 +183,22 @@ CHECK_HOST(){ echo false fi } + +push_to_mobile(){ + MESSAGE=$1 + TITLE=$2 + if [ "$3" = "2" ]; then + PRIORITY="${3}&retry=60&expire=600" + elif [ "$3" != "" ]; then + PRIORITY=$3 + else + PRIORITY=0 + fi + APP_TOKEN="aoy7mn74ddfk7ub2tv726zkjfjpxvh" + USER_TOKEN="ubt1csryf5rwa1j96de8revt2fvw4j" + wget https://api.pushover.net/1/messages.json --post-data="token=$APP_TOKEN&user=$USER_TOKEN&message=$MESSAGE&title=$TITLE&priority=$PRIORITY" -qO- > /dev/null 2>&1 & +} + declare -A abet