返回 Skill 列表
extension
分类: 效率与办公无需 API Key

Elegant Config Guardian

安全应用OpenClaw配置更改,支持自动回滚和确认超时保护。用于编辑~/.openclaw/openclaw.json、重启网关、启用功能等场景。

person作者: wangwu-30hubclawhub

Elegant Config Guardian

Use scripts/safe_apply.sh to enforce: backup → apply → restart → health check → optional ack wait → rollback on failure.

Run

bash scripts/safe_apply.sh \
  --config ~/.openclaw/openclaw.json \
  --apply-cmd 'python3 /tmp/patch.py' \
  --ack-timeout 60 \
  --require-ack

Ack mode

When --require-ack is enabled, the script prints an ack token file path. A successful manual ack is:

touch <ack-file-path>

If timeout expires without ack, rollback is triggered automatically.

Defaults

  • Health probe command: openclaw gateway status and require RPC probe: ok
  • Restart command: openclaw gateway restart
  • Backup file: <config>.bak.YYYYmmdd-HHMMSS

Recommended workflow

  1. Prepare a deterministic patch command (--apply-cmd).
  2. Run with --require-ack --ack-timeout 45 for production changes.
  3. Verify health.
  4. Ack explicitly only after end-to-end validation.
  5. Let timeout auto-rollback if validation cannot complete in time.