-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathstart.sh
More file actions
executable file
·32 lines (25 loc) · 819 Bytes
/
start.sh
File metadata and controls
executable file
·32 lines (25 loc) · 819 Bytes
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
#!/bin/bash
# Start both command handler and alert monitor
cd "$(dirname "$0")"
# Kill any existing processes
pkill -9 -f "command_handler.py" 2>/dev/null
pkill -9 -f "alert_monitor.py" 2>/dev/null
sleep 2
echo "Starting Funding Rate Bot..."
echo ""
# Start command handler (fast response to /funding commands)
caffeinate -i python3 command_handler.py &
CMD_PID=$!
echo "✅ Command Handler started (PID: $CMD_PID)"
# Wait for command handler to initialize
sleep 3
# Start alert monitor (funding rate alerts)
caffeinate -i python3 alert_monitor.py &
ALERT_PID=$!
echo "✅ Alert Monitor started (PID: $ALERT_PID)"
echo ""
echo "Both processes running!"
echo "Command Handler PID: $CMD_PID"
echo "Alert Monitor PID: $ALERT_PID"
echo ""
echo "To stop: pkill -f 'command_handler.py' && pkill -f 'alert_monitor.py'"