Files
backup_openclaw/projects/auto-trader/stop_trader.sh
2026-03-30 19:30:25 +09:00

16 lines
310 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
cd /home/arin/.openclaw/workspace/projects/auto-trader
if [ ! -f trader.pid ]; then
echo "no trader.pid"
exit 0
fi
PID=$(cat trader.pid)
if kill -0 "$PID" 2>/dev/null; then
kill "$PID"
echo "stopped pid $PID"
else
echo "pid $PID not running"
fi
rm -f trader.pid