82 lines
2.2 KiB
Bash
Executable File
82 lines
2.2 KiB
Bash
Executable File
#!/bin/bash
|
|
# ════════════════════════════════════════════════
|
|
# ARIA — Ersteinrichtung nach docker compose up
|
|
# Einmalig ausfuehren, danach persistiert alles.
|
|
# ════════════════════════════════════════════════
|
|
set -e
|
|
|
|
echo "=== ARIA Setup ==="
|
|
echo ""
|
|
|
|
# Warten bis aria-core laeuft
|
|
echo "[1/3] Warte auf aria-core..."
|
|
until docker inspect -f '{{.State.Running}}' aria-core 2>/dev/null | grep -q true; do
|
|
sleep 2
|
|
echo " ... warte..."
|
|
done
|
|
echo " aria-core laeuft."
|
|
|
|
# Permissions fixen — Docker-Volume gehoert root, OpenClaw laeuft als node
|
|
echo ""
|
|
echo "[2/3] Fixe Permissions auf /home/node/.openclaw..."
|
|
docker exec -u root aria-core chown -R node:node /home/node/.openclaw
|
|
echo " Permissions OK."
|
|
|
|
# OpenClaw Config schreiben — Custom Provider fuer claude-max-api-proxy
|
|
echo ""
|
|
echo "[3/3] Schreibe openclaw.json (Proxy-Provider + Model)..."
|
|
docker exec aria-core sh -c 'cat > /home/node/.openclaw/openclaw.json << '"'"'INNEREOF'"'"'
|
|
{
|
|
"meta": {
|
|
"lastTouchedVersion": "2026.3.8"
|
|
},
|
|
"agents": {
|
|
"defaults": {
|
|
"model": {
|
|
"primary": "proxy/claude-sonnet-4"
|
|
},
|
|
"compaction": {
|
|
"mode": "safeguard"
|
|
},
|
|
"maxConcurrent": 4,
|
|
"subagents": {
|
|
"maxConcurrent": 8
|
|
}
|
|
}
|
|
},
|
|
"models": {
|
|
"providers": {
|
|
"proxy": {
|
|
"api": "openai-completions",
|
|
"baseUrl": "http://proxy:3456/v1",
|
|
"apiKey": "not-needed",
|
|
"models": [
|
|
{ "id": "claude-sonnet-4", "name": "claude-sonnet-4" },
|
|
{ "id": "claude-opus-4", "name": "claude-opus-4" }
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"messages": {
|
|
"ackReactionScope": "all"
|
|
},
|
|
"commands": {
|
|
"native": "auto",
|
|
"nativeSkills": "auto",
|
|
"restart": true,
|
|
"ownerDisplay": "raw"
|
|
}
|
|
}
|
|
INNEREOF'
|
|
echo " Config geschrieben."
|
|
|
|
# Neustart damit Gateway die Config laedt
|
|
echo ""
|
|
echo "Starte aria-core neu..."
|
|
docker restart aria-core
|
|
|
|
echo ""
|
|
echo "=== Setup fertig ==="
|
|
echo "Teste mit: docker logs aria-core --tail 20"
|
|
echo "Erwartete Zeile: 'agent model: proxy/claude-sonnet-4'"
|