briven-backup-alert.service18 lines · main
1[Unit]
2Description=briven.tech — Discord alert when briven-backup.service exits non-zero
3Documentation=https://code.konnos.org/flndrn/briven/src/branch/main/infra/backups
4# Only meaningful as the OnFailure= target of briven-backup.service. Reads
5# /run/briven-backup-status (written by briven-backup.sh) for the failure
6# detail, then curls $BRIVEN_DISCORD_WEBHOOK_ALERTS. Fails silently if the
7# webhook env var is unset — better a missed alert than a tight loop of
8# OnFailure → OnFailure cascades on a misconfigured host.
9After=network-online.target
10Wants=network-online.target
11
12[Service]
13Type=oneshot
14EnvironmentFile=-/etc/briven/backup.env
15ExecStart=/usr/local/bin/briven-backup-alert.sh
16StandardOutput=journal
17StandardError=journal
18TimeoutStartSec=30s