#!/bin/bash
PID=$(pgrep -f "main.py" | head -1)
if [ -n "$PID" ]; then
    kill -TERM "$PID"
    sleep 2
    kill -0 "$PID" 2>/dev/null && echo "STILL ALIVE" || echo "KILLED $PID"
else
    echo "NO PROCESS FOUND"
fi
