give bitcoin more time to startup on first init

This commit is contained in:
rootzoll 2020-08-03 00:49:44 +02:00
parent 35bb82b638
commit 80db360447

View File

@ -69,12 +69,12 @@ bitcoinRunning=0
loopcount=0 loopcount=0
while [ ${bitcoinRunning} -eq 0 ] while [ ${bitcoinRunning} -eq 0 ]
do do
>&2 echo "# (${loopcount}/100) checking if ${network}d is running ... " >&2 echo "# (${loopcount}/200) checking if ${network}d is running ... "
bitcoinRunning=$(${network}-cli getblockchaininfo 2>/dev/null | grep "initialblockdownload" -c) bitcoinRunning=$(${network}-cli getblockchaininfo 2>/dev/null | grep "initialblockdownload" -c)
sleep 2 sleep 2
sync sync
loopcount=$(($loopcount +1)) loopcount=$(($loopcount +1))
if [ ${loopcount} -gt 100 ]; then if [ ${loopcount} -gt 200 ]; then
/home/admin/XXdebugLogs.sh /home/admin/XXdebugLogs.sh
echo "***********************************" echo "***********************************"
echo "FAIL: ${network} failed to start :(" echo "FAIL: ${network} failed to start :("