#!/usr/bin/env python3 import paramiko import sys HOST = "47.245.56.5" USER = "root" PASSWORD = "woaini88@" def main(): sys.stdout.reconfigure(encoding="utf-8", errors="replace") c = paramiko.SSHClient() c.set_missing_host_key_policy(paramiko.AutoAddPolicy()) c.connect(HOST, username=USER, password=PASSWORD, timeout=20) cmd = ( "cd /opt/coinox && git fetch origin main && git reset --hard origin/main && " "git log -1 --oneline && pm2 restart coinox --update-env && sleep 2 && " "grep -n '仅支持币本位' lib/options/options_register.py | head -3 && " "grep -n 'TRADE_BUDGET_USDC' lib/env/env_ui_manifest.py || echo NO_USDC_BUDGET_IN_UI" ) _, o, e = c.exec_command(cmd, timeout=90) print(o.read().decode("utf-8", "replace")[:4000]) err = e.read().decode("utf-8", "replace") if err.strip(): print("ERR:", err[:1000]) c.close() if __name__ == "__main__": main()