#!/bin/bash
# مسیر پروژه
cd /home/pybotatl/public_html/bale_bot

# اگر ربات در حال اجرا نیست، آن را اجرا کن
if ! pgrep -f "python3 bot.py" > /dev/null; then
    echo "ربات در حال اجرا نیست، راه‌اندازی مجدد..."
    nohup python3 bot.py >> bot.log 2>&1 &
fi