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>
29 lines
774 B
Python
29 lines
774 B
Python
import paramiko
|
|
|
|
HOST = "107.173.30.245"
|
|
USER = "root"
|
|
PASSWORD = "Xiao4669805"
|
|
|
|
|
|
def main() -> None:
|
|
c = paramiko.SSHClient()
|
|
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
|
c.connect(HOST, 22, USER, PASSWORD, timeout=30, allow_agent=False, look_for_keys=False)
|
|
|
|
for s in ["stash@{0}", "stash@{1}"]:
|
|
cmd = f"cd /opt/douyinWEB && git stash show --name-only {s}"
|
|
_stdin, stdout, stderr = c.exec_command(cmd, timeout=60)
|
|
out = stdout.read().decode("utf-8", "replace").strip()
|
|
err = stderr.read().decode("utf-8", "replace").strip()
|
|
print("\n====", s, "====")
|
|
if out:
|
|
print(out[:1200])
|
|
if err:
|
|
print("ERR:", err[:300])
|
|
c.close()
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|
|
|