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>
21 lines
856 B
Python
21 lines
856 B
Python
# -*- coding: utf-8 -*-
|
|
import sys, paramiko
|
|
sys.stdout.reconfigure(encoding="utf-8", errors="replace")
|
|
p = paramiko.SSHClient()
|
|
p.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
|
p.connect("107.173.30.245", 4014, "eric", "4669805", timeout=25, allow_agent=False, look_for_keys=False)
|
|
_, o, _ = p.exec_command(
|
|
"echo '4669805' | sudo -S -p '' bash -c '"
|
|
"command -v docker || echo NO_DOCKER; "
|
|
"command -v nginx || echo NO_NGINX; "
|
|
"ls /opt/douyinWEB/backend/neko 2>/dev/null; "
|
|
"ls /opt/douyinWEB/backend/neko/tampermonkey-seed 2>/dev/null | head -3 || echo NO_TM_SEED; "
|
|
"ls /opt/douyinWEB/backend/data/neko 2>/dev/null || echo NO_NEKO_DATA; "
|
|
"ip -4 addr show wg-dy 2>/dev/null | head -3; "
|
|
"systemctl is-active wg-quick@wg-dy || true"
|
|
"'",
|
|
timeout=30,
|
|
)
|
|
print(o.read().decode("utf-8", "replace"))
|
|
p.close()
|