mirror of
https://github.com/lnbook/lnbook
synced 2024-11-18 21:28:03 +00:00
bitcoind: Use loadwallet when restarting
When restarting a docker-compose set of containers we might already have created the wallet, so load it instead.
This commit is contained in:
parent
c2c2d89569
commit
28fe6cbcde
@ -15,8 +15,10 @@ echo "Importing demo private key"
|
|||||||
echo "Bitcoin address: " ${address}
|
echo "Bitcoin address: " ${address}
|
||||||
echo "Private key: " ${privkey}
|
echo "Private key: " ${privkey}
|
||||||
echo "================================================"
|
echo "================================================"
|
||||||
bitcoin-cli -datadir=/bitcoind createwallet regtest
|
# If restarting the wallet already exists, so don't fail if it does,
|
||||||
bitcoin-cli -datadir=/bitcoind importprivkey $privkey
|
# just load the existing wallet:
|
||||||
|
bitcoin-cli -datadir=/bitcoind createwallet regtest || bitcoin-cli -datadir=/bitcoind loadwallet regtest
|
||||||
|
bitcoin-cli -datadir=/bitcoind importprivkey $privkey || true
|
||||||
|
|
||||||
# Executing CMD
|
# Executing CMD
|
||||||
echo "$@"
|
echo "$@"
|
||||||
|
Loading…
Reference in New Issue
Block a user