#!/usr/bin/env bash
# Stop all validators on Computer 2

YELLOW='\033[1;33m'
GREEN='\033[0;32m'
NC='\033[0m'

echo -e "${YELLOW}🛑 Stopping Computer 2 Validators...${NC}"

for i in 5 6 7 8; do
    if [ -f "/tmp/beta-validator-$i.pid" ]; then
        PID=$(cat /tmp/beta-validator-$i.pid)
        echo -e "${GREEN}Stopping Validator $i (PID: $PID)...${NC}"
        kill $PID 2>/dev/null || true
        rm /tmp/beta-validator-$i.pid
    fi
done

echo -e "${GREEN}✅ All validators stopped${NC}"
