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>
19 lines
810 B
Python
19 lines
810 B
Python
# -*- coding: utf-8 -*-
|
|
import sys
|
|
import paramiko
|
|
|
|
sys.stdout.reconfigure(encoding="utf-8", errors="replace")
|
|
c = paramiko.SSHClient()
|
|
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
|
c.connect("192.227.152.110", 22, "root", "Leaf448772566", timeout=30, allow_agent=False, look_for_keys=False)
|
|
cmds = [
|
|
"sed -n '1,80p' /www/server/panel/vhost/nginx/proxy/miniflux.smallzhiyuns.com/*.conf",
|
|
"openssl x509 -in /root/.acme.sh/'*.smallzhiyuns.com_ecc'/fullchain.cer -noout -dates -ext subjectAltName",
|
|
"test -f /www/server/panel/vhost/nginx/ypp.smallzhiyuns.com.conf && echo SITE_EXISTS || echo SITE_ABSENT",
|
|
]
|
|
for cmd in cmds:
|
|
print("\n===== ", cmd[:90], " =====")
|
|
_, o, e = c.exec_command(cmd, timeout=15)
|
|
print((o.read() + e.read()).decode("utf-8", "replace")[-4000:])
|
|
c.close()
|