#!/bin/bash # ThatAIGuyAGI - Stop All Services echo "Stopping ThatAIGuyAGI services..." PID_DIR="${HOME}/.thataiguy/pids" # Stop by PID files for pidfile in "${PID_DIR}"/*.pid; do if [ -f "$pidfile" ]; then pid=$(cat "$pidfile") name=$(basename "$pidfile" .pid) if kill -0 "$pid" 2>/dev/null; then kill "$pid" 2>/dev/null echo " Stopped $name (PID $pid)" fi rm -f "$pidfile" fi done # Also kill by port lsof -ti:8000 | xargs kill -9 2>/dev/null || true lsof -ti:8001 | xargs kill -9 2>/dev/null || true echo "All services stopped."