Add ntfy wrapper for restore jobs
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
TOPIC="${1:-}"
|
||||
TITLE="${2:-}"
|
||||
MESSAGE="${3:-}"
|
||||
PRIORITY="${4:-default}"
|
||||
|
||||
if [ -z "$TOPIC" ] || [ -z "$TITLE" ] || [ -z "$MESSAGE" ]; then
|
||||
echo "Usage: $0 <topic> <title> <message> [priority]" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
NTFY_URL="${NTFY_URL:-https://ntfy.kaleschke.info}"
|
||||
|
||||
curl -fsS \
|
||||
-H "Title: $TITLE" \
|
||||
-H "Priority: $PRIORITY" \
|
||||
-d "$MESSAGE" \
|
||||
"$NTFY_URL/$TOPIC" >/dev/null
|
||||
Reference in New Issue
Block a user