2026-04-18 16:53:02 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
# Start bot_v3 in background
|
2026-04-18 16:59:25 +08:00
|
|
|
# Unsets ALL_PROXY so TUN VPN handles routing at network level
|
|
|
|
|
# (no more per-session proxy config needed in code)
|
2026-04-18 16:53:02 +08:00
|
|
|
|
|
|
|
|
cd ~/weatherbot
|
|
|
|
|
|
2026-04-18 16:59:25 +08:00
|
|
|
# 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
|
|
|
|
|
|
2026-04-18 16:53:02 +08:00
|
|
|
# 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"
|