feat: update scripts to use env vars

- bitcoind entrypoint set chain value
- bitcoind healthcheck fix cli parameter
- lightning entrypoint script
- lightning health script
- prepend chain in bitcoin.conf

Signed-off-by: Lakshya Singh <lakshay.singh1108@gmail.com>
This commit is contained in:
Lakshya Singh
2023-09-26 00:41:49 +05:30
parent 5b0cb901cb
commit 5c2d225be2
5 changed files with 38 additions and 11 deletions

View File

@@ -1,7 +1,8 @@
#!/bin/sh
set -e
cp -u /bitcoin.conf $BITCOIN_DATA/
cp /bitcoin.conf $BITCOIN_DATA/
sed -i "1s/^/chain=$BITCOIN_CHAIN\n/" $BITCOIN_DATA/bitcoin.conf
if [ $(echo "$1" | cut -c1) = "-" ]; then
echo "$0: assuming arguments for bitcoind"
@@ -9,5 +10,11 @@ if [ $(echo "$1" | cut -c1) = "-" ]; then
set -- bitcoind "$@"
fi
if [ $(echo "$1" | cut -c1) = "-" ] || [ "$1" = "bitcoind" ]; then
echo "$0: setting chain to $BITCOIN_CHAIN"
set -- "$@" -chain=$BITCOIN_CHAIN
fi
echo
exec "$@"
exec "$@"

View File

@@ -1 +1 @@
bitcoin-cli --chain=$BITCOIN_CHAIN getblockchaininfo
bitcoin-cli -chain=$BITCOIN_CHAIN getblockchaininfo