The missing piece of hands-off updates/backups: when a task fails while nobody has the WebUI open, LibrePortal now says so — email (via the existing Mail settings), ntfy, Gotify, Discord, Slack, Telegram, or Pushover, configured under Settings → Notifications. One hook, everywhere: the task processor reports every terminal task to `libreportal notify task <id>` (detached, never load-bearing — hard curl timeouts, failures ignored). The POLICY lives in the notify command, not the daemon: CFG_NOTIFY_EVENTS = failures (default) | all | off, and cancelled tasks never notify. Failure copy is task-aware — a failed update says the app was already rolled back and won't be retried, so the reader knows the box is safe before opening the WebUI. `libreportal notify test` sends to every enabled channel with per-channel results. Verified against a local mock endpoint: all webhook payloads, JSON escaping (quotes/newlines), the events policy, and fail-fast on dead endpoints (8ms, exit nonzero). The v0.1.0 per-app NOTIFY_* field-mapping scaffolding (never wired to a sender) stays as-is; this global channel is the system it was waiting on. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
25 lines
2.6 KiB
Plaintext
25 lines
2.6 KiB
Plaintext
# ================================================================================
|
|
# Notifications - Alerts when background work fails (updates, backups, installs)
|
|
# @icon 🔔
|
|
# ================================================================================
|
|
CFG_NOTIFY_EVENTS=failures # What to send - Failures only is the quiet default: you hear about a failed update/backup/install and nothing else. All also announces successful task results. [failures:Failures only|all:All task results|off:Off]
|
|
CFG_NOTIFY_EMAIL=false # 📧 Email - Send alerts by email. Uses the Mail settings above (CFG_MAIL_*) for the server and sender; enable those first.
|
|
CFG_NOTIFY_EMAIL_TO= # Email To - Recipient address for alert emails
|
|
CFG_NOTIFY_NTFY=false # 🔔 Ntfy - Send alerts to an ntfy topic (self-hosted or ntfy.sh)
|
|
CFG_NOTIFY_NTFY_URL=https://ntfy.sh # Ntfy Server URL - Base URL of the ntfy server
|
|
CFG_NOTIFY_NTFY_TOPIC= # Ntfy Topic - Topic name to publish alerts to
|
|
CFG_NOTIFY_NTFY_TOKEN= # Ntfy Access Token - Optional bearer token for protected topics
|
|
CFG_NOTIFY_GOTIFY=false # 🔔 Gotify - Send alerts to a self-hosted Gotify server
|
|
CFG_NOTIFY_GOTIFY_URL= # Gotify Server URL - e.g. https://gotify.example.com
|
|
CFG_NOTIFY_GOTIFY_TOKEN= # Gotify App Token - Application token from the Gotify UI
|
|
CFG_NOTIFY_DISCORD=false # 💬 Discord - Send alerts to a Discord channel via webhook
|
|
CFG_NOTIFY_DISCORD_WEBHOOK= # Discord Webhook URL - https://discord.com/api/webhooks/...
|
|
CFG_NOTIFY_SLACK=false # 💬 Slack - Send alerts to a Slack channel via incoming webhook
|
|
CFG_NOTIFY_SLACK_WEBHOOK= # Slack Webhook URL - https://hooks.slack.com/services/...
|
|
CFG_NOTIFY_TELEGRAM=false # 📱 Telegram - Send alerts via a Telegram bot
|
|
CFG_NOTIFY_TELEGRAM_TOKEN= # Telegram Bot Token - From @BotFather, e.g. 123456:ABC-DEF...
|
|
CFG_NOTIFY_TELEGRAM_CHAT_ID= # Telegram Chat ID - The chat/channel the bot posts to
|
|
CFG_NOTIFY_PUSHOVER=false # 🔔 Pushover - Send alerts via Pushover
|
|
CFG_NOTIFY_PUSHOVER_TOKEN= # Pushover App Token - Application API token
|
|
CFG_NOTIFY_PUSHOVER_USER= # Pushover User Key - Your user (or group) key
|