mirror of
https://github.com/Retropex/dockerfile-deps.git
synced 2025-05-21 11:52:28 +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"
|
mkdir -p "$WALLETDIR"
|
||||||
chown -R bitcoin:bitcoin "$WALLETDIR"
|
chown -R bitcoin:bitcoin "$WALLETDIR"
|
||||||
CONFIG_PREFIX="${CONFIG_PREFIX}${NL}walletdir=${WALLETDIR}${NL}"
|
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}..."
|
echo "The wallet does not exists, creating it at ${WALLETDIR}..."
|
||||||
gosu bitcoin bitcoin-wallet "-datadir=${WALLETDIR}" "-legacy" "-wallet=" create
|
gosu bitcoin bitcoin-wallet "-datadir=${WALLETDIR}" "-legacy" "-wallet=" create
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user