mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-10-10 21:03:09 +02:00
improved bitcoind waiting
This commit is contained in:
@@ -44,10 +44,8 @@ if [ ${mountOK} -eq 1 ]; then
|
|||||||
sudo systemctl daemon-reload
|
sudo systemctl daemon-reload
|
||||||
sudo systemctl enable ${network}d.service
|
sudo systemctl enable ${network}d.service
|
||||||
sudo systemctl start ${network}d.service
|
sudo systemctl start ${network}d.service
|
||||||
echo "Giving ${network}d service 180 seconds to init - please wait ..."
|
echo "Started ... wait 10 secs"
|
||||||
sleep 180
|
sleep 10
|
||||||
echo "OK - ${network}d started"
|
|
||||||
sleep 2
|
|
||||||
|
|
||||||
# set SetupState
|
# set SetupState
|
||||||
sudo sed -i "s/^setupStep=.*/setupStep=60/g" /home/admin/raspiblitz.info
|
sudo sed -i "s/^setupStep=.*/setupStep=60/g" /home/admin/raspiblitz.info
|
||||||
|
@@ -22,16 +22,20 @@ echo ""
|
|||||||
|
|
||||||
# verify that chainnetwork is ready
|
# verify that chainnetwork is ready
|
||||||
chainIsReady=0
|
chainIsReady=0
|
||||||
|
loopCount=0
|
||||||
|
echo "*** Wait until ${network}d is ready ..."
|
||||||
while [ ${chainIsReady} -eq 0 ]
|
while [ ${chainIsReady} -eq 0 ]
|
||||||
do
|
do
|
||||||
echo "*** Test if chainnetwork is ready ..."
|
loopCount=$(($loopCount +1))
|
||||||
date +%s
|
|
||||||
result=$(${network}-cli getblockchaininfo 2>error.out)
|
result=$(${network}-cli getblockchaininfo 2>error.out)
|
||||||
error=`cat error.out`
|
error=`cat error.out`
|
||||||
rm error.out
|
rm error.out
|
||||||
|
if [ ${#error} -gt 0 ]; then
|
||||||
|
if [ ${loopCount} -gt 33]; then
|
||||||
|
echo "*** TAKES LONGER THEN EXCEPTED ***"
|
||||||
|
date +%s
|
||||||
echo "result(${result})"
|
echo "result(${result})"
|
||||||
echo "error(${error})"
|
echo "error(${error})"
|
||||||
if [ ${#error} -gt 0 ]; then
|
|
||||||
testnetAdd=""
|
testnetAdd=""
|
||||||
if [ "${chain}" = "test" ]; then
|
if [ "${chain}" = "test" ]; then
|
||||||
testnetAdd="testnet3/"
|
testnetAdd="testnet3/"
|
||||||
@@ -40,7 +44,10 @@ while [ ${chainIsReady} -eq 0 ]
|
|||||||
echo "If you see an error -28 relax, just give it some time."
|
echo "If you see an error -28 relax, just give it some time."
|
||||||
echo "Waiting 1 minute and then trying again ..."
|
echo "Waiting 1 minute and then trying again ..."
|
||||||
sleep 60
|
sleep 60
|
||||||
echo ""
|
else
|
||||||
|
echo "(${loopCount}/33) still waiting .."
|
||||||
|
sleep 10
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "OK - chainnetwork is working"
|
echo "OK - chainnetwork is working"
|
||||||
echo ""
|
echo ""
|
||||||
|
Reference in New Issue
Block a user