2020-06-11 02:46:55 +00:00
|
|
|
#!/bin/bash
|
2020-06-15 14:40:11 +00:00
|
|
|
set -Eeuo pipefail
|
2020-06-11 02:46:55 +00:00
|
|
|
|
2020-06-15 14:40:11 +00:00
|
|
|
echo Starting bitcoind...
|
2020-06-11 02:46:55 +00:00
|
|
|
bitcoind -datadir=/bitcoind -daemon
|
2020-06-15 14:40:11 +00:00
|
|
|
until bitcoin-cli -datadir=/bitcoind getblockchaininfo > /dev/null 2>&1
|
|
|
|
do
|
|
|
|
sleep 1
|
|
|
|
done
|
|
|
|
echo bitcoind started
|
2020-06-11 02:46:55 +00:00
|
|
|
export address=`cat /bitcoind/keys/demo_address.txt`
|
|
|
|
export privkey=`cat /bitcoind/keys/demo_privkey.txt`
|
|
|
|
echo "================================================"
|
|
|
|
echo "Importing demo private key"
|
|
|
|
echo "Bitcoin address: " ${address}
|
|
|
|
echo "Private key: " ${privkey}
|
|
|
|
echo "================================================"
|
|
|
|
bitcoin-cli -datadir=/bitcoind importprivkey $privkey
|
2020-06-15 14:40:11 +00:00
|
|
|
|
|
|
|
# Executing CMD
|
|
|
|
echo "$@"
|
|
|
|
exec "$@"
|