🚀 Auto-deploy: BotVPS atualizado em 29/04/2026 10:21:34
This commit is contained in:
6
main.py
6
main.py
@@ -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."}
|
||||
|
||||
Reference in New Issue
Block a user