mirror of
https://github.com/Retropex/dockerfile-deps.git
synced 2025-05-12 00:20:42 +02:00
Create RPC wallet by default on litecoin
This commit is contained in:
parent
65d5f02f1b
commit
4520eb1175
@ -15,6 +15,19 @@ if [[ "$1" == "litecoin-cli" || "$1" == "litecoin-tx" || "$1" == "litecoind" ||
|
||||
CONFIG_PREFIX=$'mainnet=1\n[main]'
|
||||
fi
|
||||
|
||||
if [[ "$BITCOIN_WALLETDIR" ]] && [[ "$BITCOIN_NETWORK" ]]; then
|
||||
NL=$'\n'
|
||||
WALLETDIR="$BITCOIN_WALLETDIR/${BITCOIN_NETWORK}"
|
||||
WALLETFILE="${WALLETDIR}/wallet.dat"
|
||||
mkdir -p "$WALLETDIR"
|
||||
chown -R bitcoin:bitcoin "$WALLETDIR"
|
||||
CONFIG_PREFIX="${CONFIG_PREFIX}${NL}walletdir=${WALLETDIR}${NL}"
|
||||
if ! [[ -f "${WALLETFILE}" ]]; then
|
||||
echo "The wallet does not exists, creating it at ${WALLETDIR}..."
|
||||
gosu bitcoin litecoin-wallet "-datadir=${WALLETDIR}" "-wallet=" create
|
||||
fi
|
||||
fi
|
||||
|
||||
cat <<-EOF > "$BITCOIN_DATA/litecoin.conf"
|
||||
${CONFIG_PREFIX}
|
||||
printtoconsole=1
|
||||
|
@ -17,7 +17,7 @@ RUN set -ex \
|
||||
&& wget -qO litecoin.tar.gz "$LITECOIN_URL" \
|
||||
&& echo "$LITECOIN_SHA256 litecoin.tar.gz" | sha256sum -c - \
|
||||
&& mkdir bin \
|
||||
&& tar -xzvf litecoin.tar.gz -C /tmp/bin --strip-components=2 "litecoin-$LITECOIN_VERSION/bin/litecoin-cli" "litecoin-$LITECOIN_VERSION/bin/litecoind" \
|
||||
&& tar -xzvf litecoin.tar.gz -C /tmp/bin --strip-components=2 "litecoin-$LITECOIN_VERSION/bin/litecoin-cli" "litecoin-$LITECOIN_VERSION/bin/litecoind" "litecoin-$LITECOIN_VERSION/bin/litecoin-wallet" \
|
||||
&& cd bin \
|
||||
&& wget -qO gosu "https://github.com/tianon/gosu/releases/download/1.11/gosu-amd64" \
|
||||
&& echo "0b843df6d86e270c5b0f5cbd3c326a04e18f4b7f9b8457fa497b0454c4b138d7 gosu" | sha256sum -c -
|
||||
|
@ -15,7 +15,7 @@ RUN set -ex \
|
||||
&& wget -qO litecoin.tar.gz "$LITECOIN_URL" \
|
||||
&& echo "$LITECOIN_SHA256 litecoin.tar.gz" | sha256sum -c - \
|
||||
&& mkdir bin \
|
||||
&& tar -xzvf litecoin.tar.gz -C /tmp/bin --strip-components=2 "litecoin-$LITECOIN_VERSION/bin/litecoin-cli" "litecoin-$LITECOIN_VERSION/bin/litecoind" \
|
||||
&& tar -xzvf litecoin.tar.gz -C /tmp/bin --strip-components=2 "litecoin-$LITECOIN_VERSION/bin/litecoin-cli" "litecoin-$LITECOIN_VERSION/bin/litecoind" "litecoin-$LITECOIN_VERSION/bin/litecoin-wallet" \
|
||||
&& cd bin \
|
||||
&& wget -qO gosu "https://github.com/tianon/gosu/releases/download/1.11/gosu-armhf" \
|
||||
&& echo "171b4a2decc920de0dd4f49278d3e14712da5fa48de57c556f99bcdabe03552e gosu" | sha256sum -c -
|
||||
|
@ -15,7 +15,7 @@ RUN set -ex \
|
||||
&& wget -qO litecoin.tar.gz "$LITECOIN_URL" \
|
||||
&& echo "$LITECOIN_SHA256 litecoin.tar.gz" | sha256sum -c - \
|
||||
&& mkdir bin \
|
||||
&& tar -xzvf litecoin.tar.gz -C /tmp/bin --strip-components=2 "litecoin-$LITECOIN_VERSION/bin/litecoin-cli" "litecoin-$LITECOIN_VERSION/bin/litecoind" \
|
||||
&& tar -xzvf litecoin.tar.gz -C /tmp/bin --strip-components=2 "litecoin-$LITECOIN_VERSION/bin/litecoin-cli" "litecoin-$LITECOIN_VERSION/bin/litecoind" "litecoin-$LITECOIN_VERSION/bin/litecoin-wallet" \
|
||||
&& cd bin \
|
||||
&& wget -qO gosu "https://github.com/tianon/gosu/releases/download/1.14/gosu-arm64" \
|
||||
&& echo "73244a858f5514a927a0f2510d533b4b57169b64d2aa3f9d98d92a7a7df80cea gosu" | sha256sum -c -
|
||||
|
Loading…
Reference in New Issue
Block a user