2
0
mirror of https://github.com/lnbook/lnbook synced 2024-11-16 21:27:59 +00:00
lnbook/code/docker/c-lightning/wait-for-bitcoind.sh
Andreas M. Antonopoulos 6f25921336 Docker (wait-for-bitcoind) and docker-compose fixes
Sequencing of containers now works.
2020-06-18 14:35:47 -04:00

17 lines
440 B
Bash

#!/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