Update Quilibrium.sh
This commit is contained in:
parent
316270d4b0
commit
c7bf77b3fa
@ -49,20 +49,18 @@ cd ceremonyclient/node
|
|||||||
# 写入脚本
|
# 写入脚本
|
||||||
cat > auto.sh <<EOF
|
cat > auto.sh <<EOF
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
while true; do
|
while true
|
||||||
# 检查node进程是否存在
|
do
|
||||||
ps -ef | grep "node" | grep -v "grep"
|
ps -ef | grep "node" | grep -v "grep"
|
||||||
if [ "$?" -eq 1 ]; then
|
if [ "$?" -eq 1 ]
|
||||||
# 如果node进程不存在,输出信息并启动node
|
then
|
||||||
echo "Node进程未运行,正在尝试重新启动..."
|
echo "process has restarting..."
|
||||||
GOEXPERIMENT=arenas go run ./...
|
GOEXPERIMENT=arenas go run ./...
|
||||||
echo "Node进程已启动。"
|
echo "process has been restarted!"
|
||||||
else
|
else
|
||||||
# 如果node进程正在运行,输出信息
|
echo "process already started!"
|
||||||
echo "Node进程已经在运行中。"
|
fi
|
||||||
fi
|
sleep 10
|
||||||
# 每次检查后休眠10秒
|
|
||||||
sleep 10
|
|
||||||
done
|
done
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user