16 lines
310 B
Bash
Executable File
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
|