vls-container/txood/entrypoint.sh
Lakshya Singh f9de5cfa30
txoo: entrypoint update use BITCOIN_RPC_URL
- common env var
Signed-off-by: Lakshya Singh <lakshay.singh1108@gmail.com>
2023-12-14 23:21:00 +05:30

20 lines
374 B
Bash

#!/bin/sh
set -ex
if [ $(echo "$1" | cut -c1) = "-" ]; then
echo "$0: assuming arguments for txood"
set -- txood "$@"
fi
if [ $(echo "$1" | cut -c1) = "-" ] || [ "$1" = "txood" ]; then
echo "$0: setting network to $BITCOIN_NETWORK"
echo "$0: setting RPC URL to $BITCOIND_RPC_URL"
set -- "$@" --network $BITCOIN_NETWORK -r $BITCOIND_RPC_URL
fi
echo
exec "$@"