Files
SenSu/config/framework/base_config.yaml.example
T
qinglong c20417ff93 feat: 更新服务 — ZIP下载/备份/回滚/重启
UpdateService:
- 分支感知: 从 base_config 读取 branch, 拼接 archive/{branch}.zip
- 定时检查: 每6h 拉取 version.json 比对版本
- 更新前自动打包备份 (zip, 保留最新5个)
- 保护用户配置: base_config.yaml / plugins/*/config.yaml / data/
- 子进程 pip install 依赖

API:
- GET /api/updates — 更新状态
- POST /api/updates/check — 手动检查
- POST /api/updates/apply — 执行更新

回滚:
- python main.py --rollback  — 恢复到最新备份
- 无备份时提示

重启:
- .restart_flag 信号文件 → 优雅退出 → systemd 拉起

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-13 20:32:42 +08:00

54 lines
1.1 KiB
Plaintext

framework:
debug: true
name: SenSu
version: v0.7.0
branch: dev
repo_url: https://git.yeij.top/AskaEth/SenSu
logging:
debug_level_file: true
level: DEBUG
max_file_size: 10MB
max_log_files: 20
plugins:
auto_load: true
hot_reload: true
max_retry_count: 3
isolation: false
# 自动启动脚本 — 框架启动时后台拉起
auto_start_scripts:
enabled: true
scripts: []
# 示例:
# - name: cyrene_debug
# path: ~/cyrene_debug_server.py
# enabled: true
# args: []
# cwd: ~
# API Keys — 服务器间通信凭证 (在 WebUI 设置页管理)
# api_keys: []
# TUI配置
tui:
enabled: true
refresh_rate: 30
layout:
grid_rows: "4fr 5fr 1fr"
styles:
log_area: "border: solid green; overflow-y: auto;"
message_area: "border: solid yellow; overflow-y: auto;"
input_area: "border: solid red;"
log_display:
max_lines: 200
# 互联网服务配置
internet:
websocket:
host: "0.0.0.0"
port: 4240
http:
host: "0.0.0.0"
port: 4200
panel:
entrance:
path: "/SenSu"
username: "admin"
password: "CHANGE_ME" # 首次启动请修改!