Compare commits

...
2 Commits
Author SHA1 Message Date
Eric WagonerandClaude Opus 5.5 6f86076712 The hosting line says what it promises: chipping in unlocks nothing, and nothing is held back without it
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MbtUPJ24P6vc6tE1x6RS3m
2026-10-13 09:23:44 -04:00
Eric WagonerandClaude Fable 5.1 636d97d5c1 The nightly rollup and backup say by their exit status whether they managed, and the deploy leaves the cron file off a host the hall schedules
On the shared host the hall's hall-nightly.sh (game-kit, gamehall/ops) runs
both scripts for every game and checks in with Sentry Crons once for all,
so this game's own check-in files are absent there and its exit status is
the word. A box of its own keeps its cron and check-ins as before.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-12 10:07:06 -04:00
4 changed files with 16 additions and 5 deletions

No files matched your search

+5 -1
View File
@@ -25,7 +25,11 @@ ssh "root@$HOST" '
install -m 755 /opt/wizwar/deploy/wizwar-backup.sh /usr/local/bin/wizwar-backup.sh install -m 755 /opt/wizwar/deploy/wizwar-backup.sh /usr/local/bin/wizwar-backup.sh
install -m 755 /opt/wizwar/deploy/wizwar-rollup.sh /usr/local/bin/wizwar-rollup.sh install -m 755 /opt/wizwar/deploy/wizwar-rollup.sh /usr/local/bin/wizwar-rollup.sh
install -m 755 /opt/wizwar/deploy/wizwar-visitors.sh /usr/local/bin/wizwar-visitors.sh install -m 755 /opt/wizwar/deploy/wizwar-visitors.sh /usr/local/bin/wizwar-visitors.sh
install -m 644 /opt/wizwar/deploy/wizwar-rollup.cron /etc/cron.d/wizwar-rollup # On a host the hall shares, its hall-nightly.sh runs the rollup and backup
# of every game and checks in with Sentry once for all; a game on a box of
# its own schedules its own.
if [ -f /etc/cron.d/gamehall ]; then rm -f /etc/cron.d/wizwar-rollup
else install -m 644 /opt/wizwar/deploy/wizwar-rollup.cron /etc/cron.d/wizwar-rollup; fi
systemctl daemon-reload systemctl daemon-reload
systemctl enable --now wizwar systemctl enable --now wizwar
systemctl restart wizwar systemctl restart wizwar
+6 -1
View File
@@ -10,6 +10,8 @@ LOG="/var/log/wizwar/backup.log"
STAMP=$(date +%Y-%m-%d) STAMP=$(date +%Y-%m-%d)
# Sentry Crons check-in: /root/.wizwar-sentry-cron holds the check-in URL # Sentry Crons check-in: /root/.wizwar-sentry-cron holds the check-in URL
# (auto-creates the monitor on first ping). Absent file = no check-ins. # (auto-creates the monitor on first ping). Absent file = no check-ins.
# On a host the hall shares, hall-nightly.sh runs this and checks in once
# for every game, so the file is absent and the exit status is the word.
CRON_URL=$(cat /root/.wizwar-sentry-cron 2>/dev/null || true) CRON_URL=$(cat /root/.wizwar-sentry-cron 2>/dev/null || true)
# One check-in, when the run ends, carrying its duration: a start and a # One check-in, when the run ends, carrying its duration: a start and a
# finish sent seconds apart can reach Sentry in either order, and a start # finish sent seconds apart can reach Sentry in either order, and a start
@@ -20,9 +22,10 @@ checkin() { [ -n "$CRON_URL" ] && curl -sf -o /dev/null "$CRON_URL?status=$1&dur
if grep -q CHANGE_ME /root/.config/rclone/rclone.conf; then if grep -q CHANGE_ME /root/.config/rclone/rclone.conf; then
echo "$(date -Is) skipped: Spaces credentials not configured yet" >> "$LOG" echo "$(date -Is) skipped: Spaces credentials not configured yet" >> "$LOG"
exit 0 exit 1
fi fi
status=0
{ {
echo "=== $(date -Is) backup start" echo "=== $(date -Is) backup start"
if rclone sync "$SRC" "spaces:$BUCKET/wizwar/current" 2>&1 && if rclone sync "$SRC" "spaces:$BUCKET/wizwar/current" 2>&1 &&
@@ -30,6 +33,7 @@ fi
checkin ok checkin ok
else else
checkin error checkin error
status=1
fi fi
# Prune dated snapshots older than 90 days (by directory name). # Prune dated snapshots older than 90 days (by directory name).
CUTOFF=$(date -d "90 days ago" +%Y-%m-%d) CUTOFF=$(date -d "90 days ago" +%Y-%m-%d)
@@ -43,3 +47,4 @@ fi
done done
echo "=== $(date -Is) backup done" echo "=== $(date -Is) backup done"
} >> "$LOG" } >> "$LOG"
exit $status
+4 -2
View File
@@ -9,7 +9,9 @@
# one count per address per day. # one count per address per day.
# Cron: see SCHEDULE below and /etc/cron.d/wizwar-rollup (deploy.sh installs both). # Cron: see SCHEDULE below and /etc/cron.d/wizwar-rollup (deploy.sh installs both).
# Sentry Crons check-in: /root/.wizwar-sentry-cron-rollup holds the URL # Sentry Crons check-in: /root/.wizwar-sentry-cron-rollup holds the URL
# (absent = no check-ins). # (absent = no check-ins). On a host the hall shares, hall-nightly.sh
# runs this and checks in once for every game, so the file is absent and
# the exit status is the word.
set -u set -u
OUT="/var/lib/wizwar/rollup.jsonl" OUT="/var/lib/wizwar/rollup.jsonl"
LOG="/var/log/wizwar/rollup.log" LOG="/var/log/wizwar/rollup.log"
@@ -148,4 +150,4 @@ tmp = out + ".tmp"
open(tmp, "w").write("\n".join(rows) + "\n"); os.replace(tmp, out) open(tmp, "w").write("\n".join(rows) + "\n"); os.replace(tmp, out)
print("%s rollup %s: %d requests, %d human addresses, %d new rooms, %d human seats" % (datetime.datetime.now(datetime.timezone.utc).isoformat(), day, req, len(hips), new_rooms, sum(seats.values()))) print("%s rollup %s: %d requests, %d human addresses, %d new rooms, %d human seats" % (datetime.datetime.now(datetime.timezone.utc).isoformat(), day, req, len(hips), new_rooms, sum(seats.values())))
PY PY
then checkin ok; else checkin error; fi then checkin ok; else checkin error; exit 1; fi
+1 -1
View File
@@ -325,7 +325,7 @@
{/if} {/if}
<p class="hosting"> <p class="hosting">
The games of Kestrel's Hall are free and will stay free. They run on small servers that cost a few dollars a month, and anyone who wants to chip in toward the hosting can do so at The games of Kestrel's Hall are free and will stay free. They run on small servers that cost a few dollars a month, and anyone who wants to chip in toward the hosting can do so at
<a href="https://ko-fi.com/kestrelsnest" target="_blank" rel="noreferrer">ko-fi.com/kestrelsnest</a>. Every game stays whole either way. <a href="https://ko-fi.com/kestrelsnest" target="_blank" rel="noreferrer">ko-fi.com/kestrelsnest</a>. Chipping in unlocks nothing, and nothing is held back without it.
</p> </p>
<p class="colophon"> <p class="colophon">
Wiz-War © Tom Jolly. Sixth edition published by Chessex, 1993. Wiz-War © Tom Jolly. Sixth edition published by Chessex, 1993.