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>
25 lines
1.3 KiB
Python
25 lines
1.3 KiB
Python
# -*- coding: utf-8 -*-
|
|
import json
|
|
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)
|
|
|
|
cmds = [
|
|
"curl -s http://127.0.0.1:8014/api/health | python3 -m json.tool 2>/dev/null | head -80",
|
|
"systemctl cat tiktok-promo-web 2>/dev/null | head -5 || ls /etc/systemd/system/*tiktok*",
|
|
"curl -s -o /dev/null -w '%{http_code}' http://127.0.0.1:4015/login",
|
|
"curl -s http://127.0.0.1:8014/api/shorts/status 2>/dev/null | python3 -c \"import sys,json; d=json.load(sys.stdin); print('shorts running', d.get('running'), 'jobs', d.get('active_jobs'), 'err', (d.get('last_error') or '')[:80])\" 2>/dev/null",
|
|
"curl -s http://127.0.0.1:8014/api/yt-long/status 2>/dev/null | python3 -c \"import sys,json; d=json.load(sys.stdin); print('yt_long', d.get('running'), d.get('last_error','')[:80])\" 2>/dev/null",
|
|
"curl -s http://127.0.0.1:8014/api/tiktok/status 2>/dev/null | python3 -c \"import sys,json; d=json.load(sys.stdin); print('tiktok', d.get('running'), d.get('last_error','')[:80])\" 2>/dev/null",
|
|
]
|
|
|
|
for cmd in cmds:
|
|
print("===", cmd[:90])
|
|
_, o, e = c.exec_command(cmd, timeout=60)
|
|
print((o.read() + e.read()).decode("utf-8", "replace").strip()[:1200])
|
|
print()
|
|
|
|
c.close()
|