madibaalbert commited on
Commit
8ca7205
·
verified ·
1 Parent(s): 02072b6

Update entrypoint.sh

Browse files
Files changed (1) hide show
  1. entrypoint.sh +27 -11
entrypoint.sh CHANGED
@@ -1,31 +1,47 @@
1
  #!/bin/bash
2
- # 🦞 J.A.R.V.I.S - VERSION FINALE HF SPACES 2026
3
 
4
- echo ">>> [OmniGroup] ClawdBot-Jarvis - Mode Force Brute..."
5
 
6
  # Dossiers et droits
7
  mkdir -p ~/.openclaw/{agents/main/sessions,workspace/skills,credentials}
8
- chmod 700 ~/.openclaw ~/.openclaw/credentials
9
 
10
- # Configuration
11
  export OPENCLAW_GATEWAY_TOKEN="${OPENCLAW_GATEWAY_TOKEN:-omni-secret-access-7860}"
12
  export GEMINI_API_KEY="${HF_TOKEN}"
13
 
14
- # On génère le fichier de config
15
  cat > ~/.openclaw/openclaw.json <<EOF
16
  {
17
- "agents": { "defaults": { "model": { "primary": "google/gemini-3-flash" } } },
 
 
 
 
18
  "gateway": {
19
  "port": 7860,
20
  "mode": "local",
21
  "bind": "lan",
22
  "trustedProxies": ["0.0.0.0/0"],
23
- "auth": { "mode": "token", "token": "$OPENCLAW_GATEWAY_TOKEN" }
 
 
 
24
  }
25
  }
26
  EOF
27
 
28
- # On lance le Gateway en mode FOREGROUND (indispensable pour Docker/HF)
29
- # On ajoute --no-pairing pour éviter de rester bloqué par le code d'appairage
30
- echo "🚀 Lancement du Gateway en mode direct..."
31
- exec openclaw gateway --foreground --port 7860 --bind lan --token "$OPENCLAW_GATEWAY_TOKEN" --no-pairing
 
 
 
 
 
 
 
 
 
 
1
  #!/bin/bash
2
+ # 🦞 J.A.R.V.I.S - HF SPACES COMPATIBILITY FIX
3
 
4
+ echo ">>> [OmniGroup] ClawdBot-Jarvis - Démarrage direct..."
5
 
6
  # Dossiers et droits
7
  mkdir -p ~/.openclaw/{agents/main/sessions,workspace/skills,credentials}
8
+ chmod 700 ~/.openclaw
9
 
10
+ # Configuration des tokens
11
  export OPENCLAW_GATEWAY_TOKEN="${OPENCLAW_GATEWAY_TOKEN:-omni-secret-access-7860}"
12
  export GEMINI_API_KEY="${HF_TOKEN}"
13
 
14
+ # On génère le fichier de config JSON
15
  cat > ~/.openclaw/openclaw.json <<EOF
16
  {
17
+ "agents": {
18
+ "defaults": {
19
+ "model": { "primary": "google/gemini-2.0-flash-exp" }
20
+ }
21
+ },
22
  "gateway": {
23
  "port": 7860,
24
  "mode": "local",
25
  "bind": "lan",
26
  "trustedProxies": ["0.0.0.0/0"],
27
+ "auth": {
28
+ "mode": "token",
29
+ "token": "$OPENCLAW_GATEWAY_TOKEN"
30
+ }
31
  }
32
  }
33
  EOF
34
 
35
+ # On injecte la clé API pour Gemini
36
+ cat > ~/.openclaw/credentials/gemini.json <<EOF
37
+ {
38
+ "google": {
39
+ "apiKey": "$GEMINI_API_KEY"
40
+ }
41
+ }
42
+ EOF
43
+
44
+ # LANCEMENT MINIMALISTE
45
+ # Si le gateway refuse les options, on le lance SANS options et il lira le openclaw.json
46
+ echo "🚀 Lancement..."
47
+ exec openclaw gateway