check chainnetwork is ready

This commit is contained in:
rootzoll 2018-09-17 10:33:11 +02:00
parent 3e496ced74
commit df856332fb

View file

@ -27,34 +27,27 @@ fi
echo "OK - ${network}d is running" echo "OK - ${network}d is running"
echo "" echo ""
###### Wait for Blochain Sync --> LET DO THIS LATER ON LND SCAN # verify that chainnetwork is ready
#echo "*** Syncing Blockchain ***" chainIsReady=0
#ready=0 while [ ${chainIsReady} -eq 0 ]
#while [ ${ready} -eq 0 ] do
# do echo "*** Test if chaninnetwork is ready ..."
# progress="$(sudo -u bitcoin ${network}-cli getblockchaininfo | jq -r '.verificationprogress')" result=$(${network}-cli getblockchaininfo 2>error.out)
# verySmallProgress=$(echo $progress | grep -c 'e-'); error=`cat error.out`
# if [ ${verySmallProgress} -eq 1 ]; then rm error.out
# progress="0.00"; echo "result(${result})"
# fi echo "error(${error})"
# ready=$(echo $progress'>0.99' | bc -l) if [ ${#error} -gt 0 ]; then
# sync_percentage=$(printf "%.2f%%" "$(echo $progress | awk '{print 100 * $1}')") sudo tail -n 5 /mnt/hdd/bitcoin/debug.log
# #echo "progress($progress) verySmallProgress($verySmallProgress) ready($ready) sync_percentage($sync_percentage)" echo "Waiting 1 minute and then trying again ..."
# if [ ${#ready} -eq 0 ]; then sleep 60
# echo "waiting for init ... can take a while" echo ""
# ready=0 else
# elif [ "$sync_percentage" = "0.00%" ]; then echo "OK - chainnetwork is working"
# echo "waiting for network ... can take a while" chainIsReady=1
# ready=0 break
# elif [ ${ready} -eq 0 ]; then fi
# echo "${sync_percentage}" done
# else
# echo "finishing sync ... can take a while"
# fi
# sleep 3
# done
#echo "OK - Blockchain is synced"
#echo ""
###### LND Config ###### LND Config
echo "*** LND Config ***" echo "*** LND Config ***"