-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart_whale_copy.sh
More file actions
executable file
·48 lines (42 loc) · 1.33 KB
/
Copy pathstart_whale_copy.sh
File metadata and controls
executable file
·48 lines (42 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
# Start Whale Copy Bot only (no snipers)
cd /opt/pumpfun-bonkfun-bot
source venv/bin/activate
echo "============================================"
echo " WHALE COPY BOT - Starting..."
echo "============================================"
echo "Config: bots/bot-whale-copy.yaml"
echo "Wallets: smart_money_wallets.json"
echo ""
# Check if already running
if [ -f whale_copy.pid ]; then
OLD_PID=$(cat whale_copy.pid)
if ps -p $OLD_PID > /dev/null 2>&1; then
echo "Bot already running with PID: $OLD_PID"
echo "To restart: kill $OLD_PID && ./start_whale_copy.sh"
exit 1
fi
fi
# Add src to PYTHONPATH
export PYTHONPATH="/opt/pumpfun-bonkfun-bot/src:$PYTHONPATH"
# Run in background with nohup
LOG_FILE="logs/whale_copy_$(date +%Y%m%d_%H%M%S).log"
nohup python /opt/pumpfun-bonkfun-bot/src/bot_runner.py bots/bot-whale-copy.yaml > "$LOG_FILE" 2>&1 &
PID=$!
echo $PID > whale_copy.pid
sleep 3
# Verify started
if ps -p $PID > /dev/null 2>&1; then
echo "Started successfully!"
echo "PID: $PID (saved to whale_copy.pid)"
echo "Log: $LOG_FILE"
echo ""
echo "Commands:"
echo " Monitor: tail -f $LOG_FILE"
echo " Stop: kill \$(cat whale_copy.pid)"
echo " Status: ps aux | grep whale"
else
echo "ERROR: Failed to start! Check logs:"
tail -30 "$LOG_FILE"
exit 1
fi