From a7cd5fccdab4a2735445dbcb56376ddf0bcfae0d Mon Sep 17 00:00:00 2001 From: rootzoll Date: Tue, 11 Dec 2018 00:20:51 +0100 Subject: [PATCH] calculate percent correct --- home.admin/80scanLND.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/home.admin/80scanLND.sh b/home.admin/80scanLND.sh index 5198dd5..00d3404 100755 --- a/home.admin/80scanLND.sh +++ b/home.admin/80scanLND.sh @@ -30,7 +30,7 @@ scanstate="${item}/${total}" # get blockchain sync progress progress="$(echo "${blockchaininfo}" | jq -r '.verificationprogress')" -progress=$(($progress * 100)) +progress=$(echo "${progress}*100" | bc) # check if blockchain is still syncing heigh=6 @@ -42,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