fullnode.rs: restart the node correctly on non-zero exit
This commit is contained in:
parent
ead947e710
commit
2ae595294c
|
@ -423,14 +423,16 @@ while true; do
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $node_type = bootstrap_leader ]]; then
|
if [[ $node_type = bootstrap_leader ]]; then
|
||||||
wait "$pid"
|
wait "$pid" || true
|
||||||
|
echo "############## $node_type exited, restarting ##############"
|
||||||
sleep 1
|
sleep 1
|
||||||
else
|
else
|
||||||
secs_to_next_genesis_poll=1
|
secs_to_next_genesis_poll=1
|
||||||
while true; do
|
while true; do
|
||||||
if ! kill -0 "$pid"; then
|
if ! kill -0 "$pid"; then
|
||||||
wait "$pid"
|
wait "$pid" || true
|
||||||
exit 0
|
echo "############## $node_type exited, restarting ##############"
|
||||||
|
break
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
Loading…
Reference in New Issue