docs: 更新文档文件清单和可调参数表,同步代码重构

This commit is contained in:
2026-06-08 10:33:36 +08:00
parent 3f7ebfb52e
commit e421c43a40
3 changed files with 16 additions and 9 deletions
+8 -5
View File
@@ -22,7 +22,9 @@ MineSentinel 是一个 Minecraft 服务器守护进程,每 1.5 秒检测服务
/opt/minecraft/sentinel/ # 推荐部署目录
├── main.rb # 主程序入口 —— 检测循环 + 冷却期 + 初始宽限期
├── method_executor.rb # 日志系统 + 重启逻辑 + 重试计数器
── server_status_detector.rb # TCP 端口检测模块
── server_status_detector.rb # TCP 端口检测模块
├── systemd_notifier.rb # systemd watchdog 心跳发送
└── config.rb # 可调参数配置
minesentinel.service # systemd 单元文件(项目源码中)
```
@@ -35,7 +37,7 @@ minesentinel.service # systemd 单元文件(项目源码中)
```bash
mkdir -p /opt/minecraft/sentinel
cp main.rb method_executor.rb server_status_detector.rb /opt/minecraft/sentinel/
cp main.rb method_executor.rb server_status_detector.rb systemd_notifier.rb config.rb /opt/minecraft/sentinel/
```
### 2. 确认 Minecraft systemd 服务存在
@@ -132,9 +134,10 @@ MineSentinel 启动:
| 参数 | 文件 | 行 | 默认值 |
|------|------|-----|--------|
| 初始宽限期 | `main.rb` | 31 | `300` s |
| 检测间隔 | `main.rb` | 69 | `1.5` s |
| 冷却期 | `main.rb` | 58 | `200` s |
| 初始宽限期 | `config.rb` | 1 | `300` s |
| 冷却期 | `config.rb` | 3 | `200` s |
| 尝试次数 | `config.rb` | 2 | `3` |
| 检测间隔 | `main.rb` | 90 | `1.5` s |
| systemctl 超时 | `method_executor.rb` | 17 | `30` s |
| 最大重试 | `method_executor.rb` | 23 | `10` 次 |
| 检测端口 | `server_status_detector.rb` | 60 | `25565` |