Add live run scripts and watchdog cron support for autonomous uptime
This commit is contained in:
13
scripts/start_live.sh
Executable file
13
scripts/start_live.sh
Executable 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)"
|
||||
Reference in New Issue
Block a user