briven-backup-alert.service18 lines · main
| 1 | [Unit] |
| 2 | Description=briven.tech — Discord alert when briven-backup.service exits non-zero |
| 3 | Documentation=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. |
| 9 | After=network-online.target |
| 10 | Wants=network-online.target |
| 11 | |
| 12 | [Service] |
| 13 | Type=oneshot |
| 14 | EnvironmentFile=-/etc/briven/backup.env |
| 15 | ExecStart=/usr/local/bin/briven-backup-alert.sh |
| 16 | StandardOutput=journal |
| 17 | StandardError=journal |
| 18 | TimeoutStartSec=30s |