#!/bin/bash set -e REPO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" cd "$REPO_DIR" echo "🔄 Restarting app services..." # Kill running uvicorn and vite processes fuser -k -9 8000/tcp 8080/tcp 5173/tcp || true pkill -f "uvicorn backend.main:app" || true pkill -f "vite" || true sleep 2.5 export PATH="$HOME/.local/bin:$PATH" # Run backend setsid uv run uvicorn backend.main:app --host 0.0.0.0 --port 8000 > "$REPO_DIR/data/backend.log" 2>&1 & # Run frontend cd "$REPO_DIR/frontend" setsid npm run dev -- --host 0.0.0.0 --port 8080 > "$REPO_DIR/data/frontend.log" 2>&1 & echo "✅ Services restarted."