MapViewer/START_Linux.sh

22 lines
371 B
Bash
Raw Permalink Normal View History

#!/usr/bin/env bash
set -euo pipefail
PORT=8000
BASE="http://localhost:${PORT}"
python3 server.py &
SERVER_PID=$!
cleanup() {
kill "$SERVER_PID" 2>/dev/null || true
}
trap cleanup EXIT
sleep 0.5
# Default-Browser öffnen (meist Tabs)
xdg-open "${BASE}/index.html" >/dev/null 2>&1 || true
xdg-open "${BASE}/spieler.html" >/dev/null 2>&1 || true
wait "$SERVER_PID"