Fix: kill conflicting bot instances on host

This commit is contained in:
Antigravity Agent
2026-03-21 22:16:59 -03:00
parent 3e2e81bd64
commit d5febdd055

View File

@@ -1,3 +1,13 @@
#!/bin/bash
uvicorn main:app --host 0.0.0.0 --port 8000 --reload &
# Tenta limpar processos conflitantes no host se tiver acesso privilégido
if [ -d "/host_root" ]; then
echo "Limpando processos conflitantes no HOST..."
chroot /host_root /bin/bash -c "pkill -f telegram_bot.js" || true
chroot /host_root /bin/bash -c "pkill -f bot_logic.py" || true
fi
# Inicia o serviço web
uvicorn main:app --host 0.0.0.0 --port 8000 &
# Inicia o Polling do Bot
python bot_logic.py