🚀 Auto-deploy: BotVPS atualizado em 29/04/2026 10:21:34

This commit is contained in:
2026-04-29 10:21:34 +00:00
parent fa98956bcc
commit f9df9713db
3 changed files with 9 additions and 6 deletions

View File

@@ -110,9 +110,9 @@ async def run_action(data: dict, is_auth: bool = Depends(verify_password)):
if action_type == "ping":
return {"status": "success", "message": "Pong! Servidor respondendo."}
if action_type == "restart_bot":
# Simula reinício disparando sinal de término - o docker restart cuidará do resto
os.system("pkill -9 -f bot_logic.py")
return {"status": "success", "message": "Bot reiniciado."}
# Reinicia os serviços relevantes via PM2
os.system("pm2 restart bridge-telegram")
return {"status": "success", "message": "Bot do Telegram reiniciado."}
if action_type == "reboot_vps":
return {"status": "error", "message": "Reboot bloqueado via Web por segurança."}
return {"status": "error", "message": f"Ação {action_type} desconhecida."}