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