import sys from pathlib import Path sys.path.insert(0, str(Path(__file__).resolve().parent)) import vps_ssh cmds = [ "python3 /tmp/_tmp_wo_mysql.py 'SELECT id,name,slug,ip_address FROM tbl_routers'", "ip -4 addr show | sed -n '1,80p'", "ping -c 1 -W 2 100.80.255.113 || true", "command -v tailscale; tailscale status 2>/dev/null | head -20 || true", "wg show 2>/dev/null | head -40 || true", ] for cmd in cmds: print("====", cmd[:80]) code, out = vps_ssh.run(cmd, timeout=40) print("code", code) print(out[-4000:])