Files
gardentech f34817d5b6 Initial commit: scan_web integrated recording UI
FastAPI backend + vanilla JS frontend for LiDAR/camera startup, camera
settings, and rosbag recording, unifying the previous scan_gui/scan_gui_dual/
scan_gui_triple desktop tools into one web app.
2026-08-07 14:26:00 +09:00

22 lines
593 B
Bash
Executable File

#!/usr/bin/env bash
# Desktop-launcher entry point: starts the backend (if not already running)
# and opens the browser once it's actually accepting requests, instead of a
# blind sleep.
set -euo pipefail
URL="http://localhost:8000"
LOG="/home/gardentech/scan_web_logs/server.log"
mkdir -p "$(dirname "$LOG")"
if ! curl -sf "$URL/api/status" >/dev/null 2>&1; then
nohup /home/gardentech/scan_web/run_scan_web.sh >>"$LOG" 2>&1 &
for _ in $(seq 1 60); do
if curl -sf "$URL/api/status" >/dev/null 2>&1; then
break
fi
sleep 0.5
done
fi
xdg-open "$URL" >/dev/null 2>&1 &