tao-shen commited on
Commit
b4fa1fa
Β·
verified Β·
1 Parent(s): baba131

Upload scripts/entrypoint.sh with huggingface_hub

Browse files
Files changed (1) hide show
  1. scripts/entrypoint.sh +10 -1
scripts/entrypoint.sh CHANGED
@@ -29,6 +29,15 @@ export NODE_OPTIONS="${NODE_OPTIONS:+$NODE_OPTIONS }--require /home/node/scripts
29
  # Enable token redirect + A2A routing + state/agents endpoints (all in one preload)
30
  export NODE_OPTIONS="${NODE_OPTIONS:+$NODE_OPTIONS }--require /home/node/scripts/token-redirect.cjs"
31
 
 
 
 
 
 
 
 
 
 
32
  # ── Extensions symlink ──────────────────────────────────────────────────────
33
  SYMLINK_START=$(date +%s)
34
  if [ ! -L /home/node/.openclaw/extensions ]; then
@@ -67,4 +76,4 @@ fi
67
 
68
  # ── Start OpenClaw via sync_hf.py (directly on port 7860, no proxy) ───────
69
  echo "[entrypoint] Starting OpenClaw via sync_hf.py..."
70
- exec python3 -u /home/node/scripts/sync_hf.py
 
29
  # Enable token redirect + A2A routing + state/agents endpoints (all in one preload)
30
  export NODE_OPTIONS="${NODE_OPTIONS:+$NODE_OPTIONS }--require /home/node/scripts/token-redirect.cjs"
31
 
32
+ # ── Create .openclaw directory structure ─────────────────────────────────
33
+ echo "[entrypoint] Setting up .openclaw directory structure..."
34
+ mkdir -p /app/.openclaw
35
+ # Copy the default configuration file if it doesn't exist
36
+ if [ ! -f /app/.openclaw/openclaw.json ]; then
37
+ cp /home/node/scripts/openclaw.json.default /app/.openclaw/openclaw.json
38
+ echo "[entrypoint] Copied default openclaw.json config"
39
+ fi
40
+
41
  # ── Extensions symlink ──────────────────────────────────────────────────────
42
  SYMLINK_START=$(date +%s)
43
  if [ ! -L /home/node/.openclaw/extensions ]; then
 
76
 
77
  # ── Start OpenClaw via sync_hf.py (directly on port 7860, no proxy) ───────
78
  echo "[entrypoint] Starting OpenClaw via sync_hf.py..."
79
+ exec python3 -u /home/node/scripts/sync_hf.py