You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
475 B
16 lines
475 B
4 years ago
|
#!/bin/bash
|
||
|
|
||
|
# Send a notification through the Gotify gateway.
|
||
|
# $1 - the title of the message
|
||
|
# $2 - the body of the message
|
||
|
# [$3 = 5] - the message priority
|
||
|
# [$4 = $NOTIFY_TOKEN] - app token to use
|
||
|
function notify_push {
|
||
|
source $(libglm_mod env)
|
||
|
MSG_TITLE=$1
|
||
|
MSG_BODY=$2
|
||
|
MSG_TOKEN=${4:-$NOTIFY_TOKEN}
|
||
|
MSG_PRIORITY=${3:-5}
|
||
|
curl -X POST --data "title=$MSG_TITLE" --data "message=$MSG_BODY" --data "priority=$MSG_PRIORITY" "$NOTIFY_URL/message?token=$MSG_TOKEN"
|
||
|
}
|