create legacy wallet in knots like in core

This commit is contained in:
Kukks 2023-01-02 11:06:56 +01:00
parent 0fba4fb961
commit c94a3ecd0b
No known key found for this signature in database
GPG Key ID: 8E5530D9D1C93097

View File

@ -27,7 +27,7 @@ if [[ "$1" == "bitcoin-cli" || "$1" == "bitcoin-tx" || "$1" == "bitcoind" || "$1
CONFIG_PREFIX="${CONFIG_PREFIX}${NL}walletdir=${WALLETDIR}${NL}"
if ! [[ -f "${WALLETFILE}" ]]; then
echo "The wallet does not exists, creating it at ${WALLETDIR}..."
gosu bitcoin bitcoin-wallet "-datadir=${WALLETDIR}" "-wallet=" create
gosu bitcoin bitcoin-wallet "-datadir=${WALLETDIR}" "-legacy" "-wallet=" create
fi
fi
@ -58,8 +58,8 @@ if [[ "$1" == "bitcoin-cli" || "$1" == "bitcoin-tx" || "$1" == "bitcoind" || "$1
chown -R bitcoin "$BITCOIN_DATA"
ln -sfn "$BITCOIN_DATA" /home/bitcoin/.bitcoin
chown -h bitcoin:bitcoin /home/bitcoin/.bitcoin
rm -f /home/bitcoin/.bitcoin/settings.json
exec gosu bitcoin "$@"
else
exec "$@"
fi
fi