#!/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
