6870ae53da
run-restore-job-with-ntfy.sh execs send-ntfy.sh directly; without the exec bit the failure-alert path errored with Permission denied (found during Codex alert drill 2026-06-23). Set the exec bit in the repo to match the live fix. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
23 lines
451 B
Bash
Executable File
23 lines
451 B
Bash
Executable File
#!/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 \
|
|
--connect-timeout 5 \
|
|
--max-time 10 \
|
|
-H "Title: $TITLE" \
|
|
-H "Priority: $PRIORITY" \
|
|
-d "$MESSAGE" \
|
|
"$NTFY_URL/$TOPIC" >/dev/null
|