progress to percent

This commit is contained in:
rootzoll 2018-12-11 00:14:45 +01:00
parent dc0b9e3016
commit 0e242d06e0
2 changed files with 4 additions and 3 deletions

View File

@ -115,7 +115,7 @@ waitUntilChainNetworkIsReady()
locked=$(lncli --chain=${network} getinfo 2>&1 | grep -c unlock)
if [ ${locked} -gt 0 ]; then
./AAunlockLND.sh
echo "please wait ..."
echo "please wait ... update to next screen can be slow"
fi
lndSynced=$(sudo -u bitcoin /usr/local/bin/lncli --chain=${network} getinfo 2>/dev/null | jq -r '.synced_to_chain' | grep -c true)
if [ ${lndSynced} -eq 0 ]; then

View File

@ -30,6 +30,7 @@ scanstate="${item}/${total}"
# get blockchain sync progress
progress="$(echo "${blockchaininfo}" | jq -r '.verificationprogress')"
progress=$(($progress * 100))
# check if blockchain is still syncing
heigh=6
@ -41,11 +42,11 @@ if [ ${isWaitingBlockchain} -gt 0 ]; then
fi
if [ ${isInitialChainSync} -gt 0 ]; then
heigh=7
infoStr=" Waiting for final Blockchain Sync\n Progress: ${progress}\n Please wait - this can take some time.\n ssh admin@${localip}\n Password A"
infoStr=" Waiting for final Blockchain Sync\n Progress: ${progress}%\n Please wait - this can take some time.\n ssh admin@${localip}\n Password A"
if [ "$USER" = "admin" ]; then
heigh=6
width=53
infoStr=$(echo " Waiting for final Blockchain Sync\n Progress: ${progress}\n Please wait - this can take some long time.\n Its OK to close terminal and ssh back in later.")
infoStr=$(echo " Waiting for final Blockchain Sync\n Progress: ${progress}%\n Please wait - this can take some long time.\n Its OK to close terminal and ssh back in later.")
fi
else
heigh=7