douyinWEB/scripts/_deploy_reauth_batch2.py
eric d409e416da Ship physical dual-edge stack, Studio CDP live metrics, and ops tooling.
Capture Neko/WG/network hubs, Studio viewer charts, physical deploy docs, and one-shot scripts so VPS vs physical can be toggled later without losing WIP.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-04 22:42:40 -05:00

24 lines
758 B
Python

# -*- coding: utf-8 -*-
import paramiko
c = paramiko.SSHClient()
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
c.connect("107.173.30.245", 22, "root", "Xiao4669805", timeout=30, allow_agent=False, look_for_keys=False)
sftp = c.open_sftp()
sftp.put(
r"C:/Users/admin/Desktop/douyinWEB/frontend/src/app/shorts/reauth-batch/page.tsx",
"/opt/douyinWEB/frontend/src/app/shorts/reauth-batch/page.tsx",
)
sftp.close()
def run(cmd, timeout=240):
_, o, e = c.exec_command(cmd, timeout=timeout)
return (o.read() + e.read()).decode("utf-8", "replace").strip()
print(run("cd /opt/douyinWEB/frontend && npm run build 2>&1 | tail -8"))
print(run("systemctl restart douyinweb-web; systemctl is-active douyinweb-web"))
c.close()
print("DONE")