mirror of
https://github.com/Retropex/dockerfile-deps.git
synced 2025-05-13 00:40:41 +02:00
[Bitcoin] Add CREATE_WALLET to control if the container need to create wallet by default
This commit is contained in:
parent
c23a68d65f
commit
e35bea7557
@ -25,7 +25,8 @@ if [[ "$1" == "bitcoin-cli" || "$1" == "bitcoin-tx" || "$1" == "bitcoind" || "$1
|
||||
mkdir -p "$WALLETDIR"
|
||||
chown -R bitcoin:bitcoin "$WALLETDIR"
|
||||
CONFIG_PREFIX="${CONFIG_PREFIX}${NL}walletdir=${WALLETDIR}${NL}"
|
||||
if ! [[ -f "${WALLETFILE}" ]]; then
|
||||
: "${CREATE_WALLET:=true}"
|
||||
if ! [[ -f "${WALLETFILE}" ]] && [[ "${CREATE_WALLET}" != "false" ]]; then
|
||||
echo "The wallet does not exists, creating it at ${WALLETDIR}..."
|
||||
gosu bitcoin bitcoin-wallet "-datadir=${WALLETDIR}" "-legacy" "-wallet=" create
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user