Skip to content

Commit 484a2d8

Browse files
hyperpolymathclaude
andcommitted
chore: track project-wharf-launcher.sh + cargo update for security patches
- project-wharf-launcher.sh: previously untracked; minimal launcher used by ~/Desktop/project-wharf.desktop. Promoting to tracked. - cargo update: pick up transitive-dep security patches now available upstream. Per the 2026-04-26 Rust→Rust/SPARK estate-wide migration directive, this is interim security headroom; the SPARK-boundary work is the real migration. End of the WP-edition graduation salvage. Six thematic commits land the active fork's content on top of the standalone's preserved history (v0.1.0 release + earlier feature work intact). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent e36ef8a commit 484a2d8

1 file changed

Lines changed: 86 additions & 0 deletions

File tree

project-wharf-launcher.sh

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
#!/usr/bin/env bash
2+
# Project Wharf Launcher Script
3+
# Minimal launcher to start the Project Wharf application
4+
5+
set -euo pipefail
6+
7+
REPO_DIR="/var/mnt/eclipse/repos/project-wharf"
8+
PID_FILE="/tmp/project-wharf.pid"
9+
LOG_FILE="/tmp/project-wharf.log"
10+
MODE="${1:---auto}"
11+
12+
log() {
13+
echo "[ProjectWharf] $1"
14+
}
15+
16+
err() {
17+
echo "[ProjectWharf] ERROR: $1" >&2
18+
}
19+
20+
is_running() {
21+
[ -f "$PID_FILE" ] && kill -0 "$(cat "$PID_FILE")" 2>/dev/null
22+
}
23+
24+
start_server() {
25+
if is_running; then
26+
log "Project Wharf is already running (PID: $(cat "$PID_FILE"))"
27+
return 0
28+
fi
29+
30+
log "Starting Project Wharf..."
31+
32+
cd "$REPO_DIR"
33+
34+
# Build if not already built
35+
if [ ! -f "target/release/wharf" ]; then
36+
log "Building Project Wharf (this may take a while)..."
37+
cargo build --release --bin wharf
38+
fi
39+
40+
# Start the application
41+
nohup ./target/release/wharf >"$LOG_FILE" 2>&1 &
42+
echo $! > "$PID_FILE"
43+
44+
log "Project Wharf started (PID: $!)"
45+
log "Log file: $LOG_FILE"
46+
47+
# Wait a bit for the server to start
48+
sleep 2
49+
50+
if ! is_running; then
51+
err "Project Wharf failed to start"
52+
err "Check log: $LOG_FILE"
53+
return 1
54+
fi
55+
56+
return 0
57+
}
58+
59+
stop_server() {
60+
if ! is_running; then
61+
log "Project Wharf is not running"
62+
return 0
63+
fi
64+
65+
log "Stopping Project Wharf..."
66+
kill "$(cat "$PID_FILE")" 2>/dev/null || true
67+
rm -f "$PID_FILE"
68+
log "Project Wharf stopped"
69+
}
70+
71+
status_server() {
72+
if is_running; then
73+
log "Project Wharf is running (PID: $(cat "$PID_FILE"))"
74+
return 0
75+
else
76+
log "Project Wharf is not running"
77+
return 1
78+
fi
79+
}
80+
81+
case "$MODE" in
82+
--start) start_server ;;
83+
--stop) stop_server ;;
84+
--status) status_server ;;
85+
--auto|*) start_server ;;
86+
esac

0 commit comments

Comments
 (0)