refactor: 修复潜在bug、补全许可声明、添加类型注解、同步文档

This commit is contained in:
2026-06-08 11:35:51 +08:00
parent b43527c52e
commit 60176fa316
10 changed files with 138 additions and 14 deletions
+3 -2
View File
@@ -24,7 +24,8 @@ MineSentinel 是一个 Minecraft 服务器守护进程,每 1.5 秒检测服务
├── method_executor.rb # 日志系统 + 重启逻辑 + 重试计数器
├── server_status_detector.rb # TCP 端口检测模块
├── systemd_notifier.rb # systemd watchdog 心跳发送
── config.rb # 可调参数配置
── config.rb # 可调参数配置
└── updates.rb # 更新检查模块
minesentinel.service # systemd 单元文件(项目源码中)
```
@@ -37,7 +38,7 @@ minesentinel.service # systemd 单元文件(项目源码中)
```bash
mkdir -p /opt/minecraft/sentinel
cp main.rb method_executor.rb server_status_detector.rb systemd_notifier.rb config.rb /opt/minecraft/sentinel/
cp main.rb method_executor.rb server_status_detector.rb systemd_notifier.rb config.rb updates.rb /opt/minecraft/sentinel/
```
### 2. 确认 Minecraft systemd 服务存在