fix: clearer LICENSE_CLIENT_KEY setup and ignore empty env overrides.

license.env now fills blank LICENSE_* values; error text points to copying license.env.example.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-17 17:11:54 +08:00
parent fd1bf9982c
commit 863da10d1f
2 changed files with 18 additions and 4 deletions
+11 -1
View File
@@ -24,7 +24,13 @@
## 环境变量
在仓库根目录创建 **`license.env`**(勿提交 Git,或写入各实例 `.env`
**仓库根目录**创建 **`license.env`**(勿提交 Git):
```bash
cd /opt/crypto_monitor_user # 或你的安装目录
cp license.env.example license.env
# 编辑 license.envLICENSE_CLIENT_KEY 必须与授权站 CLIENT_API_KEY 完全一致
```
```env
LICENSE_API_URL=https://sq.bz121.com
@@ -35,6 +41,10 @@ LICENSE_CLIENT_KEY=与授权站 CLIENT_API_KEY 相同
# LICENSE_DISABLED=false
```
改完后**重启** Flask / 中控进程。页面若提示未配置 `LICENSE_CLIENT_KEY`,就是根目录缺少有效的 `license.env`
也可在各实例 `.env` 里写同样的 `LICENSE_*`(不要留空键)。
许可状态保存在仓库根目录 **`data/license_state.json`**(三所 + 中控共用)。
系统约每 **3 天** 向授权站校验一次;明确过期或换机后旧设备将无法使用。