[object Object]

← back to Model Arena

Add one-shot install-keepalive.sh so the launchd install pastes as one atomic line

34d6cce6b5883b7af66c33a014553b05df193b75 · 2026-09-23 09:09:52 -0700 · Steve Abrams

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Files touched

Diff

commit 34d6cce6b5883b7af66c33a014553b05df193b75
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Wed Sep 23 09:09:52 2026 -0700

    Add one-shot install-keepalive.sh so the launchd install pastes as one atomic line
    
    Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
 deploy/install-keepalive.sh | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/deploy/install-keepalive.sh b/deploy/install-keepalive.sh
new file mode 100755
index 0000000..58362fb
--- /dev/null
+++ b/deploy/install-keepalive.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+# One-shot installer for the model-arena launchd KeepAlive (PAUSED, spend-safe).
+# Run: bash ~/Projects/model-arena/deploy/install-keepalive.sh
+set -u
+UID_N="$(id -u)"
+PLIST=~/Library/LaunchAgents/com.steve.model-arena.plist
+
+echo "→ stopping any current :9758 instance so KeepAlive owns the port"
+lsof -ti tcp:9758 2>/dev/null | xargs kill 2>/dev/null || true
+sleep 1
+
+echo "→ installing plist"
+cp ~/Projects/model-arena/deploy/com.steve.model-arena.plist "$PLIST"
+
+echo "→ (re)loading launchd job"
+launchctl bootout "gui/$UID_N/com.steve.model-arena" 2>/dev/null || true
+launchctl bootstrap "gui/$UID_N" "$PLIST"
+launchctl kickstart -k "gui/$UID_N/com.steve.model-arena"
+sleep 2
+
+echo ""
+echo "===== VERIFY ====="
+echo "http:   $(curl -s -o /dev/null -w '%{http_code}' -u admin:DW2024! http://127.0.0.1:9758/)  (expect 200)"
+echo "launchd: $(launchctl list | grep model-arena || echo 'NOT LISTED')"
+echo "paused:  $(grep -o '\[CHALLENGES PAUSED[^]]*\]' /tmp/model-arena.log | tail -1 || echo 'no PAUSED banner — check log')"
+echo "tunnel:  $(curl -s -o /dev/null -w '%{http_code}' https://modelarena.agentabrams.com/)  (expect 401 = healthy basic-auth)"

← 0183631 Add durable keepalive wrapper + launchd plist draft (paused,  ·  back to Model Arena  ·  Fix: complete ARENA_PAUSED gate and implement held-run relea c0fcc0d →