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,23 @@
#!/usr/bin/env sh
set -eu
ROOT=${CLAWDBOX_AGENT_ROOT:-/data/agents/clawd}
PID_FILE="$ROOT/logs/node-host.pid"
if [ ! -f "$PID_FILE" ]; then
echo "No pid file"
exit 0
fi
pid=$(cat "$PID_FILE" 2>/dev/null || true)
case "$pid" in
*[!0-9]*|"")
echo "Invalid pid file: $pid"
exit 1
;;
*)
kill "$pid" 2>/dev/null || true
rm -f "$PID_FILE"
echo "Stopped ClawdBox-CLI node host: pid $pid"
;;
esac