txoo: entrypoint update use BITCOIN_RPC_URL

- common env var
Signed-off-by: Lakshya Singh <lakshay.singh1108@gmail.com>
This commit is contained in:
Lakshya Singh
2023-12-14 23:19:10 +05:30
parent 4ae7afa4a5
commit f9de5cfa30
3 changed files with 13 additions and 7 deletions

View File

@@ -1,11 +1,19 @@
#!/bin/sh
set -e
set -ex
if [ $(echo "$1" | cut -c1) = "-" ]; then
echo "$0: assuming arguments for txood"
set -- txood --network $BITCOIN_NETWORK "$@"
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 "$@"
exec "$@"