#!/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" }