8900 commited on
Update entrypoint.sh
Browse files- entrypoint.sh +5 -18
entrypoint.sh
CHANGED
|
@@ -2,12 +2,7 @@
|
|
| 2 |
|
| 3 |
# OpenClaw HF Spaces - Production Entrypoint
|
| 4 |
|
| 5 |
-
#
|
| 6 |
-
# SETUP_MARKER lives in /tmp.
|
| 7 |
-
# /tmp is wiped on container restart but survives gateway restart.
|
| 8 |
-
# So setup only runs once per container lifetime.
|
| 9 |
-
|
| 10 |
-
SETUP_MARKER="/tmp/.openclaw-setup-done"
|
| 11 |
|
| 12 |
# ββ resolve writable home βββββββββββ
|
| 13 |
|
|
@@ -38,21 +33,13 @@ done
|
|
| 38 |
|
| 39 |
export HF_TOKEN="${HF_TOKEN:-}"
|
| 40 |
|
| 41 |
-
# ββ run setup
|
| 42 |
-
|
| 43 |
-
# Gateway restart reuses /tmp, so marker survives -> setup skipped.
|
| 44 |
-
# Container restart wipes /tmp, marker gone -> setup runs once.
|
| 45 |
|
| 46 |
-
|
| 47 |
-
echo "[entrypoint] First boot - running setupβ¦"
|
| 48 |
node /app/spaces/huggingface/setup-hf-config.mjs || true
|
| 49 |
-
|
| 50 |
-
echo "[entrypoint] Setup done (marker created)"
|
| 51 |
-
else
|
| 52 |
-
echo "[entrypoint] Gateway restart - setup skipped (settings preserved)"
|
| 53 |
-
fi
|
| 54 |
|
| 55 |
-
# ββ security audit
|
| 56 |
|
| 57 |
if [ -f /app/security-check.sh ]; then
|
| 58 |
sh /app/security-check.sh || true
|
|
|
|
| 2 |
|
| 3 |
# OpenClaw HF Spaces - Production Entrypoint
|
| 4 |
|
| 5 |
+
# Setup always runs - but setup.mjs patches existing config, never overwrites.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
# ββ resolve writable home βββββββββββ
|
| 8 |
|
|
|
|
| 33 |
|
| 34 |
export HF_TOKEN="${HF_TOKEN:-}"
|
| 35 |
|
| 36 |
+
# ββ run setup βββββββββββββββ
|
|
|
|
|
|
|
|
|
|
| 37 |
|
| 38 |
+
echo "[entrypoint] Running setupβ¦"
|
|
|
|
| 39 |
node /app/spaces/huggingface/setup-hf-config.mjs || true
|
| 40 |
+
echo "[entrypoint] Setup done."
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
|
| 42 |
+
# ββ security audit ββββββββββββββββββββ
|
| 43 |
|
| 44 |
if [ -f /app/security-check.sh ]; then
|
| 45 |
sh /app/security-check.sh || true
|