stop_echo_system.sh
1 #!/usr/bin/env bash 2 # 3 # ECHO System Shutdown 4 # Stops all agents + monitor dashboard 5 # 6 7 echo "🛑 Stopping ECHO System..." 8 9 # 1. Kill all agents 10 echo "🤖 Stopping agents..." 11 pkill -f "apps/ceo/ceo" || true 12 pkill -f "apps/cto/cto" || true 13 pkill -f "apps/chro/chro" || true 14 pkill -f "apps/operations_head/operations_head" || true 15 pkill -f "apps/product_manager/product_manager" || true 16 pkill -f "apps/senior_architect/senior_architect" || true 17 pkill -f "apps/uiux_engineer/uiux_engineer" || true 18 pkill -f "apps/senior_developer/senior_developer" || true 19 pkill -f "apps/test_lead/test_lead" || true 20 21 # 2. Kill monitor dashboard 22 echo "📊 Stopping monitor..." 23 if [ -f monitor/logs/monitor.pid ]; then 24 MONITOR_PID=$(cat monitor/logs/monitor.pid) 25 kill $MONITOR_PID 2>/dev/null || true 26 rm -f monitor/logs/monitor.pid 27 fi 28 pkill -f "mix phx.server" || true # Fallback 29 30 # 3. Clean up PID files 31 rm -f logs/autonomous/*.pid 2>/dev/null || true 32 33 # 4. Stop Docker (optional - uncomment if you want to stop infrastructure) 34 # echo "📦 Stopping infrastructure..." 35 # docker-compose down 36 37 echo "" 38 echo "✅ ECHO System Stopped!" 39 echo "" 40 echo "Infrastructure (PostgreSQL/Redis) still running." 41 echo "To stop Docker: docker-compose down" 42 echo ""