refactor: Update credential synchronization to async Gitea fetch and simplify root HTML serving.

This commit is contained in:
2026-03-24 02:26:23 +00:00
parent cb729809a9
commit 2480846e31
3 changed files with 27 additions and 12 deletions

View File

@@ -1,13 +1,15 @@
#!/bin/bash
# Tenta limpar processos conflitantes no host se tiver acesso privilégido
# 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 -f telegram_bot.js" || true
chroot /host_root /bin/bash -c "pkill -f bot_logic.py" || true
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
# 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
python bot_logic.py
# Inicia o Polling do Bot com log unbuffered
echo "Iniciando Bot (bot_logic.py)..."
python3 -u bot_logic.py