2019-06-15 23:02:44 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2019-08-20 01:36:58 +00:00
|
|
|
set -x
|
|
|
|
set -e
|
|
|
|
|
2021-04-11 00:51:26 +00:00
|
|
|
# Wait to see if bitcoin is synced
|
2019-06-15 23:02:44 +00:00
|
|
|
echo "Checking if Bitcoin is synced..."
|
2021-04-11 00:51:26 +00:00
|
|
|
while [ ! -f "/mnt/hdd/mynode/.mynode_bitcoin_synced" ]; do
|
2019-11-04 03:59:43 +00:00
|
|
|
echo "BTC not synced, sleeping 30s"
|
|
|
|
/bin/sleep 30s
|
2019-06-15 23:02:44 +00:00
|
|
|
done
|
|
|
|
|
2021-04-11 00:51:26 +00:00
|
|
|
# And finally, make sure bitcoin responds to API requests
|
2019-08-20 01:36:58 +00:00
|
|
|
bitcoin-cli -datadir=/mnt/hdd/mynode/bitcoin -rpcwait getblockchaininfo
|
2019-06-15 23:02:44 +00:00
|
|
|
|
|
|
|
exit 0
|