From 4ee8dba7daf6f8f39dd803a0b070080cbfbb815c Mon Sep 17 00:00:00 2001 From: smeb y <48400087+a3165458@users.noreply.github.com> Date: Sat, 2 Mar 2024 14:26:42 +0800 Subject: [PATCH] Update Quilibrium.sh --- Quilibrium.sh | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/Quilibrium.sh b/Quilibrium.sh index 7b8b049..585fd88 100644 --- a/Quilibrium.sh +++ b/Quilibrium.sh @@ -46,5 +46,28 @@ git clone https://github.com/quilibriumnetwork/ceremonyclient # Navigate to ceremonyclient/node directory cd ceremonyclient/node +# 写入脚本 +cat > auto.sh < /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'