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:
@@ -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 "$@"
|
||||
|
||||
@@ -1 +1 @@
|
||||
bitcoin-cli --chain=$BITCOIN_CHAIN getblockchaininfo
|
||||
bitcoin-cli -chain=$BITCOIN_CHAIN getblockchaininfo
|
||||
Reference in New Issue
Block a user