Files

23 lines
659 B
Bash
Raw Permalink Normal View History

#!/bin/bash
# Start bot_v3 in background
# Unsets ALL_PROXY so TUN VPN handles routing at network level
# (no more per-session proxy config needed in code)
cd ~/weatherbot
# Unset SOCKS proxy env vars — TUN mode handles routing at OS level
unset ALL_PROXY all_proxy http_proxy https_proxy HTTP_PROXY HTTPS_PROXY
# Check if already running
if pgrep -f "bot_v3.py run" > /dev/null 2>&1; then
echo "bot_v3 is already running!"
pgrep -f "bot_v3.py run" | xargs ps -p
exit 1
fi
nohup ~/weatherbot/venv/bin/python bot_v3.py run > ~/weatherbot/bot_v3.log 2>&1 &
PID=$!
echo "bot_v3 started with PID: $PID"
echo "Log file: ~/weatherbot/bot_v3.log"