From 0df412c01402f02f31e8a5280df2d83615aaff8b Mon Sep 17 00:00:00 2001 From: Smittix Date: Mon, 2 Mar 2026 10:10:44 +0000 Subject: [PATCH] feat: show LAN address instead of 0.0.0.0 in start.sh output Resolves the machine's LAN IP via hostname -I so users see a clickable URL they can use from other devices on the network. Co-Authored-By: Claude Opus 4.6 --- start.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/start.sh b/start.sh index f13c8f0..a2da13c 100755 --- a/start.sh +++ b/start.sh @@ -129,10 +129,20 @@ if "$PYTHON" -c "import gevent" 2>/dev/null; then HAS_GEVENT=1 fi +# ── Resolve LAN address for display ────────────────────────────────────────── +if [[ "$HOST" == "0.0.0.0" ]]; then + LAN_IP=$(hostname -I 2>/dev/null | awk '{print $1}') + LAN_IP="${LAN_IP:-localhost}" +else + LAN_IP="$HOST" +fi +PROTO="http" +[[ "$HTTPS" -eq 1 ]] && PROTO="https" + # ── Start the server ───────────────────────────────────────────────────────── if [[ "$HAS_GUNICORN" -eq 1 && "$HAS_GEVENT" -eq 1 ]]; then echo "[INTERCEPT] Starting production server (gunicorn + gevent)..." - echo "[INTERCEPT] Listening on ${HOST}:${PORT}" + echo "[INTERCEPT] Listening on ${PROTO}://${LAN_IP}:${PORT}" GUNICORN_ARGS=( -c "$SCRIPT_DIR/gunicorn.conf.py"