File size: 834 Bytes
17d5591
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh
# 1. Start the memory sync script in the background
python3 -u /app/sync_memory.py &

# 2. Ensure config directories exist
mkdir -p /root/.molt

# 3. Write the Hard Reset configuration
# We write to both config.json and openclaw.json to ensure the app picks it up
cat <<EOF > /root/.molt/config.json
{
  "gateway": {
    "bind": "0.0.0.0",
    "port": 7860,
    "token": "WebuitokenPassword12345",
    "allowedOrigins": ["*"],
    "auth": {
      "mode": "token"
    }
  },
  "storage": {
     "basePath": "/data"
  }
}
EOF

cp /root/.molt/config.json /root/.molt/openclaw.json

echo "Force-wrote configuration to /root/.molt/"

# 4. Start the Moltbot process
# We use 'exec' so signals (like SIGTERM) are passed correctly to the node process
exec node /app/dist/index.js gateway --port 7860 --bind lan --allow-unconfigured