check bitcoin running

This commit is contained in:
rootzoll
2021-05-25 14:12:26 -05:00
parent d7d28c81c4
commit 5c476fdb96

View File

@@ -124,7 +124,7 @@ loopcount=0
while [ ${bitcoinRunning} -eq 0 ]
do
>&2 echo "# (${loopcount}/200) checking if ${network}d is running ... " >> ${logFile}
bitcoinRunning=$(${network}-cli getblockchaininfo 2>/dev/null | grep "initialblockdownload" -c)
bitcoinRunning=$(sudo -u bitcoin ${network}-cli getblockchaininfo 2>/dev/null | grep "initialblockdownload" -c)
sleep 2
sync
loopcount=$(($loopcount +1))