Add live run scripts and watchdog cron support for autonomous uptime

This commit is contained in:
2026-02-26 09:12:46 -08:00
parent ddc42254fa
commit 94aba00967
2 changed files with 42 additions and 0 deletions

13
scripts/start_live.sh Executable file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT="/home/drjones/.openclaw/workspace/alpaca-llm-bot-v1"
LOGDIR="/home/drjones/.openclaw/workspace/logs"
mkdir -p "$LOGDIR"
cd "$ROOT"
if [[ -f "$LOGDIR/alpaca-bot.pid" ]] && kill -0 "$(cat $LOGDIR/alpaca-bot.pid)" 2>/dev/null; then
echo "already_running"
exit 0
fi
nohup python3 -m uvicorn app:app --host 0.0.0.0 --port 8089 > "$LOGDIR/alpaca-bot.log" 2>&1 &
echo $! > "$LOGDIR/alpaca-bot.pid"
echo "started $(cat $LOGDIR/alpaca-bot.pid)"