Start OpenClaw node host on ClawdBox boot

This commit is contained in:
Clawdbot
2026-06-07 14:30:07 +10:00
parent 18f559c4e6
commit 48e30b9d0e
8 changed files with 244 additions and 15 deletions

View File

@@ -0,0 +1,18 @@
#!/usr/bin/env sh
set -eu
ROOT=${CLAWDBOX_AGENT_ROOT:-/data/agents/clawd}
PID_FILE="$ROOT/logs/node-host.pid"
LOG_FILE="$ROOT/logs/node-host.log"
if [ -f "$PID_FILE" ]; then
pid=$(cat "$PID_FILE" 2>/dev/null || true)
case "$pid" in
*[!0-9]*|"") echo "Invalid pid file: $pid" ;;
*) ps -p "$pid" -o pid,etime,cmd || true ;;
esac
else
echo "No pid file"
fi
sed -n '1,120p' "$LOG_FILE" 2>/dev/null || true