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>
23 lines
928 B
Python
23 lines
928 B
Python
# -*- coding: utf-8 -*-
|
|
import sys, paramiko
|
|
sys.stdout.reconfigure(encoding="utf-8", errors="replace")
|
|
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)
|
|
def run(cmd):
|
|
_, o, e = c.exec_command(cmd, timeout=60)
|
|
return (o.read()+e.read()).decode("utf-8","replace").strip()
|
|
print(run("curl -s http://127.0.0.1:8787/api/monitor/status"))
|
|
print("---")
|
|
print(run(r"""cd /opt/douyinWEB/backend && .venv/bin/python - <<'PY'
|
|
from app import db
|
|
from app.db import get_settings_map
|
|
db.init_db()
|
|
cfg = get_settings_map()
|
|
for k in ['quiet_hours_enabled','quiet_hours_start','quiet_hours_end','max_concurrency','live_interval_sec','offline_interval_sec','monitor_enabled']:
|
|
print(k, cfg.get(k))
|
|
from app.db import overdue_rooms_stats
|
|
print('overdue', overdue_rooms_stats())
|
|
PY"""))
|
|
c.close()
|