02a54e26f5
gates / gates (push) Successful in 5m6s
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
11 lines
662 B
Bash
Executable File
11 lines
662 B
Bash
Executable File
#!/bin/bash
|
|
# felhom-backup-failmail — mail admin@ that a Felhom backup unit on DooPlex failed (R-232 (a) route, reused).
|
|
# Called by felhom-backup-failmail@<unit>.service, which the backup units name in OnFailure=.
|
|
# Reuses notify_failure from /opt/backup/scripts/backup-config.sh (Resend; never prints the key; never fails).
|
|
# No `set -u`: backup-config.sh reads unset variables (NOTIFY_WEBHOOK_URL), which killed the first dry run.
|
|
UNIT=${1:?unit name}
|
|
CONFIG=${FELHOM_FAILMAIL_CONFIG:-/opt/backup/scripts/backup-config.sh}
|
|
# shellcheck source=/dev/null
|
|
. "$CONFIG"
|
|
notify_failure "systemd unit ${UNIT} failed on $(hostname) — see: journalctl -u ${UNIT}"
|