vls-container/bitcoind/entrypoint.sh
Lakshya Singh 5c2d225be2
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>
2023-09-29 23:27:40 +05:30

21 lines
399 B
Bash
Executable File

#!/bin/sh
set -e
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"
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 "$@"