mirror of
https://gitee.com/xmz7891/ykxmz.git
synced 2026-10-18 18:20:43 +00:00
手表端 - 修「连上后一片白屏」:initTabs() 从来没被调用过, 导致 tabDefs 为 null、selectTab 直接 return, 标签栏里只剩一个孤立的滑动指示器 - 应用名改成 ykxmz 被控端 - 修「设备已关闭新设备配对」:配对码本身就是密钥, 拿着正确的码就该放行。老逻辑"首台配对后自动关窗"会把 手表重装的人永久挡在外面 - 应用名改成 ykxmz 服务器端 - / 改成官网(公开,简洁介绍 + 下载) - /zhingzhuanzhan 中转站管理(要登录),/admin 自动跳转 - 管理账号 xmz7891,可改 - 官网 / 登录页 / 管理页都加上 favicon
41 lines
1.1 KiB
Python
41 lines
1.1 KiB
Python
# -*- coding: utf-8 -*-
|
||
r'''检查 relay 服务状态并重跑网页检查。'''
|
||
from __future__ import annotations
|
||
|
||
import sys
|
||
import time
|
||
from pathlib import Path
|
||
|
||
ROOT = Path(r"C:\Users\shu\Desktop\deepseekagent\LanRemote")
|
||
sys.path.insert(0, str(ROOT / "_build"))
|
||
|
||
from devssh import run # noqa: E402
|
||
|
||
|
||
def main() -> int:
|
||
print(" 服务状态:")
|
||
_c, out, _e = run(
|
||
"for s in lanremote-relay lanremote-tunnel lanremote-nettune.service; do "
|
||
"printf ' %-26s %s\\n' $s $(systemctl is-active $s); done", timeout=60)
|
||
print(out)
|
||
|
||
print(" 监听端口:")
|
||
_c, out, _e = run("ss -tlnp 2>/dev/null | grep -E '8080|:80 ' | head -5",
|
||
timeout=60)
|
||
print(out or " (没在监听 8080)")
|
||
|
||
print(" 最后几行日志:")
|
||
_c, out, _e = run("tail -12 /root/lanremote-relay/relay.log 2>/dev/null",
|
||
timeout=60)
|
||
print(out)
|
||
|
||
print(" 等一下再跑检查…")
|
||
time.sleep(6)
|
||
_c, out, _e = run("bash /root/check_web.sh 2>&1", timeout=240)
|
||
print(out)
|
||
return 0
|
||
|
||
|
||
if __name__ == "__main__":
|
||
sys.exit(main())
|