#!/usr/bin/env bash # Entrypoint wrapper to set PATH and run gateway CLI or node script set -euo pipefail export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:$PATH" cd /home/openclaw2/openclaw2 # If gateway has an npm script or binary, prefer ./node_modules/.bin export PATH="/home/openclaw2/openclaw2/node_modules/.bin:$PATH" # Start gateway (example) if [ -f ./scripts/start-gateway.sh ]; then exec ./scripts/start-gateway.sh fi # Fallback: try node ./gateway/index.js if [ -f ./gateway/index.js ]; then exec node ./gateway/index.js fi # Fallback to openclaw CLI exec /home/openclaw2/openclaw2/node_modules/.bin/openclaw gateway