Send cert alerts to ntfy over loopback

The script posted alerts to https://ntfy.silverwal.com/certbot, which is
served by the same nginx whose certificates it monitors. A TLS failure on
this host would make curl -fsS fail verification and drop the alert
describing that failure, leaving only a line in a log nobody reads.
ntfy is already bound to 127.0.0.1:2586, so post there instead.
This commit is contained in:
Walusimbi Silver
2026-09-03 14:31:51 +03:00
parent 7f188cc12a
commit ebde01ddeb
2 changed files with 9 additions and 2 deletions

View File

@@ -4,7 +4,7 @@ set -uo pipefail
CERT_DIR="${CERT_DIR:-/etc/letsencrypt/live}"
EXPIRY_DAYS="${EXPIRY_DAYS:-14}"
NTFY_URL="${NTFY_URL:-https://ntfy.silverwal.com/certbot}"
NTFY_URL="${NTFY_URL:-http://127.0.0.1:2586/certbot}"
NTFY_TITLE="${NTFY_TITLE:-SSL certificate warning}"
NTFY_PRIORITY="${NTFY_PRIORITY:-high}"
NTFY_TAGS="${NTFY_TAGS:-warning,lock}"