16 lines
543 B
Bash
Executable File
16 lines
543 B
Bash
Executable File
#!/bin/bash
|
|
# Tenta limpar processos conflitantes no host se tiver acesso privilegiado
|
|
if [ -d "/host_root" ]; then
|
|
echo "Limpando processos conflitantes no HOST..."
|
|
chroot /host_root /bin/bash -c "pkill -9 -f telegram_bot.js" || true
|
|
chroot /host_root /bin/bash -c "pkill -9 -f bot_logic.py" || true
|
|
fi
|
|
|
|
# Inicia o serviço web com log unbuffered
|
|
echo "Iniciando Uvicorn..."
|
|
uvicorn main:app --host 0.0.0.0 --port 8000 &
|
|
|
|
# Inicia o Polling do Bot com log unbuffered
|
|
echo "Iniciando Bot (bot_logic.py)..."
|
|
python3 -u bot_logic.py
|