#!/usr/bin/env bash # ───────────────────────────────────────────────────────────────── # Chess Analyzer — Launch Script # ───────────────────────────────────────────────────────────────── set -e # 1. Force find Stockfish (check common Debian paths) if [ -z "$STOCKFISH_PATH" ]; then export STOCKFISH_PATH=$(which stockfish || echo "/usr/games/stockfish") fi echo " ✓ Stockfish Path: $STOCKFISH_PATH" # 2. Verify it is executable if [ ! -x "$STOCKFISH_PATH" ]; then echo " ✗ Error: Stockfish not found or not executable at $STOCKFISH_PATH" exit 1 fi # 3. Start the app pinned to your 2 efficiency cores echo " 🚀 Launching on Port ${PORT:-7860}..." exec python3 app.py