Browse Source

improved bitcoind waiting

dev
rootzoll 6 years ago
parent
commit
eafc7b6981
  1. 6
      home.admin/60finishHDD.sh
  2. 15
      home.admin/70initLND.sh

6
home.admin/60finishHDD.sh

@ -44,10 +44,8 @@ if [ ${mountOK} -eq 1 ]; then
sudo systemctl daemon-reload
sudo systemctl enable ${network}d.service
sudo systemctl start ${network}d.service
echo "Giving ${network}d service 180 seconds to init - please wait ..."
sleep 180
echo "OK - ${network}d started"
sleep 2
echo "Started ... wait 10 secs"
sleep 10
# set SetupState
sudo sed -i "s/^setupStep=.*/setupStep=60/g" /home/admin/raspiblitz.info

15
home.admin/70initLND.sh

@ -22,16 +22,20 @@ echo ""
# verify that chainnetwork is ready
chainIsReady=0
loopCount=0
echo "*** Wait until ${network}d is ready ..."
while [ ${chainIsReady} -eq 0 ]
do
echo "*** Test if chainnetwork is ready ..."
date +%s
loopCount=$(($loopCount +1))
result=$(${network}-cli getblockchaininfo 2>error.out)
error=`cat 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 "error(${error})"
if [ ${#error} -gt 0 ]; then
testnetAdd=""
if [ "${chain}" = "test" ]; then
testnetAdd="testnet3/"
@ -40,7 +44,10 @@ while [ ${chainIsReady} -eq 0 ]
echo "If you see an error -28 relax, just give it some time."
echo "Waiting 1 minute and then trying again ..."
sleep 60
echo ""
else
echo "(${loopCount}/33) still waiting .."
sleep 10
fi
else
echo "OK - chainnetwork is working"
echo ""

Loading…
Cancel
Save