f82721a9ef
- start_bot_v3.sh: unset ALL_PROXY/all_proxy so TUN VPN handles all traffic - Revert _direct_session and _tg_session proxy config - All requests now use standard requests module (goes through TUN) - Keep Telegram notification functions (tg_signal, tg_scan_summary) - Keep config.json with bot token and chat ID
23 lines
659 B
Bash
Executable File
23 lines
659 B
Bash
Executable File
#!/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"
|