heiyuheiyu commited on
Commit
c63132e
·
verified ·
1 Parent(s): 1af5f62

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -3
Dockerfile CHANGED
@@ -265,16 +265,16 @@ set -e
265
  # mkdir -p /root/.openclaw/logs
266
  # 因此不能以目錄是否存在或為空作為判定依據。
267
  #
268
- # 改用 openclaw.json 作為判定標誌:
269
  # - 該文件由本腳本在 restore() 之後的配置寫入步驟生成
270
  # - mkdir -p /root/.openclaw/logs 不會創建它
271
  # - 首次部署 / 任何形式的容器重建:文件不存在 → 執行 restore()
272
  # - 運行中再次調用本腳本(文件已存在) → 跳過 restore()
273
- if [ ! -f /root/.openclaw/openclaw.json ]; then
274
  echo "=== First deploy / rebuild detected: running restore() ==="
275
  python3 /usr/local/bin/sync.py restore
276
  else
277
- echo "=== openclaw.json exists, skipping restore() ==="
278
  fi
279
 
280
  mkdir -p /root/.openclaw/sessions
 
265
  # mkdir -p /root/.openclaw/logs
266
  # 因此不能以目錄是否存在或為空作為判定依據。
267
  #
268
+ # 改用 workspace/USER.md 作為判定標誌:
269
  # - 該文件由本腳本在 restore() 之後的配置寫入步驟生成
270
  # - mkdir -p /root/.openclaw/logs 不會創建它
271
  # - 首次部署 / 任何形式的容器重建:文件不存在 → 執行 restore()
272
  # - 運行中再次調用本腳本(文件已存在) → 跳過 restore()
273
+ if [ ! -f /root/.openclaw/workspace/USER.md ]; then
274
  echo "=== First deploy / rebuild detected: running restore() ==="
275
  python3 /usr/local/bin/sync.py restore
276
  else
277
+ echo "=== USER.md exists, skipping restore() ==="
278
  fi
279
 
280
  mkdir -p /root/.openclaw/sessions