#!/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 < /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