mirror of
https://github.com/RoboSats/robosats.git
synced 2024-12-14 19:36:24 +00:00
18 lines
588 B
Bash
18 lines
588 B
Bash
|
#!/bin/sh
|
||
|
|
||
|
# Start bitcoind in the background
|
||
|
bitcoind "$@" &
|
||
|
|
||
|
# Wait for bitcoind to be ready
|
||
|
while ! bitcoin-cli --regtest --rpcuser=test --rpcpassword=test getblockchaininfo 2>/dev/null | grep '"verificationprogress":'; do
|
||
|
echo "Waiting for bitcoind to be ready..."
|
||
|
sleep 1
|
||
|
done
|
||
|
|
||
|
# Run initialization commands
|
||
|
bitcoin-cli --regtest --rpcuser=test --rpcpassword=test createwallet default
|
||
|
bitcoin-cli --regtest --rpcuser=test --rpcpassword=test generatetoaddress 1 $(bitcoin-cli --regtest --rpcuser=test --rpcpassword=test getnewaddress)
|
||
|
|
||
|
# Bring bitcoind to the foreground
|
||
|
wait
|