blitz.web.api.sh update-config for testnet (#2724)

This commit is contained in:
openoms 2021-11-25 16:33:58 -05:00 committed by GitHub
parent 1c158759b1
commit 27d5c63fc6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -131,11 +131,23 @@ if [ "$1" = "update-config" ]; then
echo "# CONFIG Web API Lightning --> LND"
tlsCert=$(sudo xxd -ps -u -c 1000 /mnt/hdd/lnd/tls.cert)
adminMacaroon=$(sudo xxd -ps -u -c 1000 /mnt/hdd/lnd/data/chain/bitcoin/mainnet/admin.macaroon)
adminMacaroon=$(sudo xxd -ps -u -c 1000 /mnt/hdd/lnd/data/chain/bitcoin/${chain}net/admin.macaroon)
sed -i "s/^ln_node=.*/ln_node=lnd/g" ./.env
sed -i "s/^lnd_grpc_ip=.*/lnd_grpc_ip=127.0.0.1/g" ./.env
sed -i "s/^lnd_macaroon=.*/lnd_macaroon=${adminMacaroon}/g" ./.env
sed -i "s/^lnd_cert=.*/lnd_cert=${tlsCert}/g" ./.env
if [ "${chain}" == "main" ];then
L2rpcportmod=0
portprefix=""
elif [ "${chain}" == "test" ];then
L2rpcportmod=1
portprefix=1
elif [ "${chain}" == "sig" ];then
L2rpcportmod=3
portprefix=3
fi
lnd_grpc_port=1${L2rpcportmod}009
lnd_rest_port=${portprefix}8080
# configure CL
elif [ "${lightning}" == "cl" ]; then