Two failures today were invisible: the ngit/Amber remote signer stalling
mid-push, and the deploy timer skipping while origin/main had moved.
- scripts/auto-deploy.sh records the reason for every skip (and the run time)
to ~/.local/state/skatespots-deploy/{last-skip,last-run}.
- scripts/ops-health.sh reads that back and prints repo/push sync, the skip
reason, the throttle window and timer health; exit 1 when action is needed.
--probe-push runs a bounded real push (the only true signer probe),
--notify desktop-notifies (deduped), --quiet is silent when healthy.
- Periodic watch: skatespots-ops-health.{service,timer} (every 15 min) plus
scripts/install-ops-health-timer.sh.
Docs: AGENTS.md Deploy section.
18 lines
567 B
Bash
Executable file
18 lines
567 B
Bash
Executable file
#!/usr/bin/env bash
|
|
#
|
|
# Install the periodic ops-health systemd user timer (signer + deploy watch).
|
|
# scripts/install-ops-health-timer.sh
|
|
set -euo pipefail
|
|
|
|
SRC="$(cd "$(dirname "$0")/systemd" && pwd)"
|
|
DEST="$HOME/.config/systemd/user"
|
|
mkdir -p "$DEST"
|
|
|
|
cp "$SRC/skatespots-ops-health.service" "$DEST/"
|
|
cp "$SRC/skatespots-ops-health.timer" "$DEST/"
|
|
|
|
chmod +x "$(cd "$(dirname "$0")" && pwd)/ops-health.sh"
|
|
|
|
systemctl --user daemon-reload
|
|
systemctl --user enable --now skatespots-ops-health.timer
|
|
systemctl --user list-timers skatespots-ops-health.timer --no-pager
|