forked from 0xfnzero/jito-shredstream-install
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshredstream-fra.sh
More file actions
executable file
·40 lines (34 loc) · 1.07 KB
/
Copy pathshredstream-fra.sh
File metadata and controls
executable file
·40 lines (34 loc) · 1.07 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
#!/bin/bash
set -e
# 配置
PID_FILE="shredstream.pid"
LOG_FILE="shredstream.log"
rm -f "$LOG_FILE"
# 检查并停止旧进程
if [ -f "$PID_FILE" ]; then
OLD_PID=$(cat "$PID_FILE")
if ps -p "$OLD_PID" > /dev/null 2>&1; then
echo "Found running process with PID $OLD_PID. Stopping..."
kill "$OLD_PID"
sleep 1
if ps -p "$OLD_PID" > /dev/null 2>&1; then
echo "Process $OLD_PID did not exit, force killing..."
kill -9 "$OLD_PID"
fi
echo "Stopped previous process."
else
echo "Found stale PID file. Removing..."
fi
rm -f "$PID_FILE"
fi
# 启动新进程
echo "Starting new jito-shredstream-proxy..."
RUST_LOG=info /root/shredstream-proxy/jito-shredstream-proxy shredstream \
--block-engine-url https://frankfurt.mainnet.block-engine.jito.wtf \
--desired-regions frankfurt \
--auth-keypair /root/shred_keypair.json \
--dest-ip-ports 127.0.0.1:8001 \
--grpc-service-port 10800
NEW_PID=$!
echo "$NEW_PID" > "$PID_FILE"
echo "Started with PID $NEW_PID. Logs at $LOG_FILE"