Create start-openclaw.sh
Browse files- start-openclaw.sh +45 -0
start-openclaw.sh
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
set -e
|
| 3 |
+
|
| 4 |
+
mkdir -p /root/.openclaw/agents/main/sessions
|
| 5 |
+
mkdir -p /root/.openclaw/credentials
|
| 6 |
+
mkdir -p /root/.openclaw/sessions
|
| 7 |
+
|
| 8 |
+
python3 /app/sync.py restore
|
| 9 |
+
|
| 10 |
+
cat > /root/.openclaw/openclaw.json <<EOF
|
| 11 |
+
{
|
| 12 |
+
"models": {
|
| 13 |
+
"providers": {
|
| 14 |
+
"ollama": {
|
| 15 |
+
"baseUrl": "https://o.paas.eu.cc/api/chat",
|
| 16 |
+
"api": "ollama",
|
| 17 |
+
"models": [
|
| 18 |
+
{ "id": "8648f39daa8f", "name": "gemma3:1b", "contextWindow": 32768 }
|
| 19 |
+
]
|
| 20 |
+
}
|
| 21 |
+
}
|
| 22 |
+
},
|
| 23 |
+
"agents": {
|
| 24 |
+
"defaults": {
|
| 25 |
+
"model": { "primary": "ollama/1b" }
|
| 26 |
+
}
|
| 27 |
+
},
|
| 28 |
+
"commands": {
|
| 29 |
+
"restart": true
|
| 30 |
+
},
|
| 31 |
+
"gateway": {
|
| 32 |
+
"mode": "local",
|
| 33 |
+
"bind": "lan",
|
| 34 |
+
"port": $PORT,
|
| 35 |
+
"trustedProxies": ["0.0.0.0/0"],
|
| 36 |
+
"auth": { "mode": "token", "token": "$OPENCLAW_GATEWAY_PASSWORD" },
|
| 37 |
+
"controlUi": { "allowInsecureAuth": true }
|
| 38 |
+
}
|
| 39 |
+
}
|
| 40 |
+
EOF
|
| 41 |
+
|
| 42 |
+
(while true; do sleep 3600; python3 /app/sync.py backup; done) &
|
| 43 |
+
|
| 44 |
+
openclaw doctor --fix
|
| 45 |
+
exec openclaw gateway run --port $PORT
|