#!/usr/bin/env bash # install-backup-freshness-timer.sh — install/refresh the daily backup-freshness # alert as a systemd USER timer on nh3-dev (the only host with SSH to all backup # stores + althing-cli). Idempotent; re-run after editing the wrapper/check. # Requires linger (loginctl enable-linger lkraven) so it fires without a login. set -euo pipefail UNIT_DIR="$HOME/.config/systemd/user" REPO=/home/lkraven/development/eshpfi-management mkdir -p "$UNIT_DIR" cat > "$UNIT_DIR/backup-freshness.service" <postbox alone would have # left this unit just as dead, with a different error message. Environment=ALTHING_HANDLE=infra-ops Environment=ALTHING_POST_OFFICE=http://10.100.50.40:8390 ExecStart=$REPO/scripts/backup-freshness-alert.sh EOF cat > "$UNIT_DIR/backup-freshness.timer" <