58 lines
1.1 KiB
Markdown
58 lines
1.1 KiB
Markdown
# 运维速查 — Ops Quick Reference
|
||
|
||
## 飞书白名单管理
|
||
|
||
```bash
|
||
# 查看当前白名单
|
||
python3 -c "
|
||
import json
|
||
d = json.load(open('/root/.openclaw/openclaw.json'))
|
||
print(d['channels']['feishu']['allowFrom'])
|
||
"
|
||
|
||
# 添加用户(需要 open_id)
|
||
# 编辑 ~/.openclaw/openclaw.json → channels.feishu.allowFrom
|
||
# 添加后无需重启,配置热加载生效
|
||
```
|
||
|
||
## Git 推送
|
||
|
||
```bash
|
||
cd /root/.openclaw/workspace
|
||
git add -A
|
||
git commit -m "更新说明"
|
||
git push
|
||
```
|
||
|
||
## 自动同步(每天 2:30 AM)
|
||
|
||
- **脚本:** `/root/sync-xdespace.sh`
|
||
- **日志:** `/root/xdespace-sync.log`
|
||
- **定时:** crontab `30 2 * * *`
|
||
- **功能:** 检测工作区变更 → 自动提交 → 推送远程
|
||
- **超时:** Git 操作超时 30 秒,超时或远程不响应则跳过
|
||
- **互斥锁:** 防止前一次未完成时重复运行
|
||
|
||
## Ollama
|
||
|
||
```bash
|
||
# 查看模型
|
||
ollama list
|
||
|
||
# 拉取模型
|
||
ollama pull <模型名>
|
||
|
||
# 推理测试
|
||
ollama run qwen2.5:7b "你好"
|
||
```
|
||
|
||
## 系统维护
|
||
|
||
```bash
|
||
# Gateway 状态
|
||
openclaw gateway status
|
||
|
||
# 查看日志(飞书/网关)
|
||
journalctl -u openclaw --no-pager -n 50
|
||
```
|