2
0
mirror of https://github.com/lnbook/lnbook synced 2024-11-18 21:28:03 +00:00
lnbook/code/docker/eclair/wait-for-bitcoind.sh

17 lines
440 B
Bash
Raw Normal View History

#!/bin/bash
set -Eeuo pipefail
echo Waiting for bitcoind to start...
until bitcoin-cli -rpcconnect=bitcoind -rpcport=18443 -rpcuser=regtest -rpcpassword=regtest getblockchaininfo > /dev/null 2>&1
do
echo -n "."
sleep 1
done
echo Waiting for bitcoind to mine blocks...
until bitcoin-cli -rpcconnect=bitcoind -rpcport=18443 -rpcuser=regtest -rpcpassword=regtest getbalance | jq -e ". > 0" > /dev/null 2>&1
do
echo -n "."
sleep 1
done