● Zion Boggan
repos/Zion Pm/archive/old-conductor-sketch/bin/notify.sh
zionboggan.com ↗
6 lines · bash
History for this file →
1
set -uo pipefail
2
TITLE="${1:-Zion PM}"; MSG="${2:?message}"
3
TOPIC="${PM_NTFY_TOPIC:-zion-pm}"
4
SERVER="${PM_NTFY_SERVER:-https://ntfy.sh}"
5
curl -s -H "Title: $TITLE" -H "Tags: robot" -d "$MSG" "$SERVER/$TOPIC" >/dev/null \
6
  && echo "[pm] notified $TOPIC" || echo "[pm] notify failed (set PM_NTFY_SERVER/topic)"