This commit is contained in:
2025-11-25 10:51:51 -05:00
parent 2521a5a5be
commit 305dd49dde
3 changed files with 389 additions and 143 deletions
+7 -8
View File
@@ -2,17 +2,16 @@
set -euo pipefail
msg="$1"
APPRISE_API_URL="${APPRISE_API_URL:-}"
# Apprise CLI
# Local Apprise CLI if available
if command -v apprise >/dev/null 2>&1; then
apprise -b "$msg" >/dev/null 2>&1 || true
apprise -b "$msg" >/dev/null 2>&1 || true
fi
# Apprise API
if [[ -n "${APPRISE_API_URL:-}" ]]; then
curl -s -X POST \
-H "Content-Type: application/json" \
-F "{\"body\":\"$msg\"}" \
-F "tags=all" \
"$APPRISE_API_URL" >/dev/null 2>&1 || true
if [[ -n "$APPRISE_API_URL" ]]; then
curl -fsS -X POST -H "Content-Type: application/json" \
-d "$(jq -n --arg b "$msg" '{body:$b}')" \
"$APPRISE_API_URL/notify" >/dev/null 2>&1 || true
fi