Update Quilibrium.sh

This commit is contained in:
smeb y 2024-03-02 14:26:42 +08:00 committed by GitHub
parent 8e649b858c
commit 4ee8dba7da
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -46,5 +46,28 @@ git clone https://github.com/quilibriumnetwork/ceremonyclient
# Navigate to ceremonyclient/node directory
cd ceremonyclient/node
# 写入脚本
cat > auto.sh <<EOF
#!/bin/bash
while true; do
# 检查node进程是否存在
pgrep node > /dev/null
if [ $? -ne 0 ]; then
# 如果node进程不存在输出信息并启动node
echo "Node进程未运行正在尝试重新启动..."
GOEXPERIMENT=arenas go run ./...
echo "Node进程已启动。"
else
# 如果node进程正在运行输出信息
echo "Node进程已经在运行中。"
fi
# 每次检查后休眠10秒
sleep 10
done
EOF
# 赋予权限
chmod +x auto.sh
# Create a screen session and run the command
screen -dmS Quili bash -c 'GOEXPERIMENT=arenas go run ./...'
screen -dmS Quili bash -c './auto.sh'