mirror of
https://github.com/Retropex/raspiblitz.git
synced 2025-05-12 19:20:48 +02:00
c-lightning-REST improvements, balance display fix (#4005)
* improve handling aliases when no network given * clrest install to use absolute paths * fix cln balance display * remove misplaced line * improve jq expressions * convert msat balances to sat discussed in: https://github.com/raspiblitz/raspiblitz/issues/3837
This commit is contained in:
parent
237570af44
commit
8c87bee0f6
@ -2,16 +2,16 @@
|
|||||||
|
|
||||||
# command info
|
# command info
|
||||||
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
||||||
echo "monitor and troubleshot the c-lightning network"
|
echo "monitor and troubleshot the c-lightning network"
|
||||||
echo "cl.monitor.sh [mainnet|testnet|signet] status"
|
echo "cl.monitor.sh [mainnet|testnet|signet] status"
|
||||||
echo "cl.monitor.sh [mainnet|testnet|signet] config"
|
echo "cl.monitor.sh [mainnet|testnet|signet] config"
|
||||||
echo "cl.monitor.sh [mainnet|testnet|signet] info"
|
echo "cl.monitor.sh [mainnet|testnet|signet] info"
|
||||||
echo "cl.monitor.sh [mainnet|testnet|signet] wallet"
|
echo "cl.monitor.sh [mainnet|testnet|signet] wallet"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# check if started with sudo
|
# check if started with sudo
|
||||||
if [ "$EUID" -ne 0 ]; then
|
if [ "$EUID" -ne 0 ]; then
|
||||||
echo "error='run as root'"
|
echo "error='run as root'"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@ -51,7 +51,7 @@ if [ "$2" = "status" ]; then
|
|||||||
cl_locked="0"
|
cl_locked="0"
|
||||||
cl_error_short=""
|
cl_error_short=""
|
||||||
cl_error_full=""
|
cl_error_full=""
|
||||||
|
|
||||||
if [ "${cl_running}" = "0" ]; then
|
if [ "${cl_running}" = "0" ]; then
|
||||||
# check if error because wallet is locked
|
# check if error because wallet is locked
|
||||||
# the next release will have soecific error code for decryption error
|
# the next release will have soecific error code for decryption error
|
||||||
@ -59,23 +59,24 @@ if [ "$2" = "status" ]; then
|
|||||||
source /mnt/hdd/raspiblitz.conf
|
source /mnt/hdd/raspiblitz.conf
|
||||||
# password file is on the disk if encrypted and auto-unlock is enabled
|
# password file is on the disk if encrypted and auto-unlock is enabled
|
||||||
passwordFile="/dev/shm/.${netprefix}cl.pw"
|
passwordFile="/dev/shm/.${netprefix}cl.pw"
|
||||||
if grep -Eq "${netprefix}clEncryptedHSM=on" /mnt/hdd/raspiblitz.conf;then
|
if grep -Eq "${netprefix}clEncryptedHSM=on" /mnt/hdd/raspiblitz.conf; then
|
||||||
if grep -Eq "${netprefix}clAutoUnlock=on" /mnt/hdd/raspiblitz.conf;then
|
if grep -Eq "${netprefix}clAutoUnlock=on" /mnt/hdd/raspiblitz.conf; then
|
||||||
passwordFile=/home/bitcoin/.${netprefix}cl.pw
|
passwordFile=/home/bitcoin/.${netprefix}cl.pw
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
clError=$(sudo journalctl -n5 -u ${netprefix}lightningd)
|
clError=$(sudo journalctl -n5 -u ${netprefix}lightningd)
|
||||||
|
|
||||||
# cases from 'cl.hsmtool.sh unlock'
|
# cases from 'cl.hsmtool.sh unlock'
|
||||||
if \
|
if
|
||||||
[ "$(eval echo \$${netprefix}clEncryptedHSM)" = "on" ] && [ ! -f $passwordFile ] || \
|
[ "$(eval echo \$${netprefix}clEncryptedHSM)" = "on" ] && [ ! -f $passwordFile ] ||
|
||||||
[ $(echo "${clError}" | \
|
[ $(echo "${clError}" |
|
||||||
grep -c 'encrypted-hsm: Could not read pass from stdin.') -gt 0 ] || \
|
grep -c 'encrypted-hsm: Could not read pass from stdin.') -gt 0 ] ||
|
||||||
[ $(echo "${clError}" | \
|
[ $(echo "${clError}" |
|
||||||
grep -c 'hsm_secret is encrypted, you need to pass the --encrypted-hsm startup option.') -gt 0 ] || \
|
grep -c 'hsm_secret is encrypted, you need to pass the --encrypted-hsm startup option.') -gt 0 ] ||
|
||||||
[ $(echo "${clError}" | \
|
[ $(echo "${clError}" |
|
||||||
grep -c 'Wrong password for encrypted hsm_secret.') -gt 0 ]; then
|
grep -c 'Wrong password for encrypted hsm_secret.') -gt 0 ]
|
||||||
|
then
|
||||||
|
|
||||||
# signal wallet locked
|
# signal wallet locked
|
||||||
cl_locked="1"
|
cl_locked="1"
|
||||||
# dont report it as error
|
# dont report it as error
|
||||||
@ -108,13 +109,13 @@ if [ "$2" = "status" ]; then
|
|||||||
# check results if proof for online
|
# check results if proof for online
|
||||||
else
|
else
|
||||||
cl_ready="1"
|
cl_ready="1"
|
||||||
connections=$( echo "${winData}" | grep "num_peers\"" | tr -cd '[[:digit:]]')
|
connections=$(echo "${winData}" | grep "num_peers\"" | tr -cd '[[:digit:]]')
|
||||||
if [ "${connections}" != "" ] && [ "${connections}" != "0" ]; then
|
if [ "${connections}" != "" ] && [ "${connections}" != "0" ]; then
|
||||||
cl_online="1"
|
cl_online="1"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# print results
|
# print results
|
||||||
echo "ln_cl_version='${cl_version}'"
|
echo "ln_cl_version='${cl_version}'"
|
||||||
@ -126,7 +127,7 @@ if [ "$2" = "status" ]; then
|
|||||||
echo "ln_cl_error_full='${cl_error_full}'"
|
echo "ln_cl_error_full='${cl_error_full}'"
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
######################################################
|
######################################################
|
||||||
# CONFIG
|
# CONFIG
|
||||||
@ -146,7 +147,6 @@ if [ "$2" = "config" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
######################################################
|
######################################################
|
||||||
# INFO
|
# INFO
|
||||||
######################################################
|
######################################################
|
||||||
@ -178,9 +178,9 @@ if [ "$2" = "info" ]; then
|
|||||||
cl_channels_pending=$(echo "${ln_getInfo}" | jq -r '.num_pending_channels')
|
cl_channels_pending=$(echo "${ln_getInfo}" | jq -r '.num_pending_channels')
|
||||||
cl_channels_active=$(echo "${ln_getInfo}" | jq -r '.num_active_channels')
|
cl_channels_active=$(echo "${ln_getInfo}" | jq -r '.num_active_channels')
|
||||||
cl_channels_inactive=$(echo "${ln_getInfo}" | jq -r '.num_inactive_channels')
|
cl_channels_inactive=$(echo "${ln_getInfo}" | jq -r '.num_inactive_channels')
|
||||||
cl_channels_total=$(( cl_channels_pending + cl_channels_active + cl_channels_inactive ))
|
cl_channels_total=$((cl_channels_pending + cl_channels_active + cl_channels_inactive))
|
||||||
cl_peers=$(echo "${ln_getInfo}" | jq -r '.num_peers')
|
cl_peers=$(echo "${ln_getInfo}" | jq -r '.num_peers')
|
||||||
cl_fees_collected_msat=$(echo "${ln_getInfo}" | jq -r '.fees_collected_msat')
|
cl_fees_collected_msat=$(echo "${ln_getInfo}" | jq -r '.fees_collected_msat')
|
||||||
|
|
||||||
# calculate with cached value if c-lightning is fully synced
|
# calculate with cached value if c-lightning is fully synced
|
||||||
source <(/home/admin/_cache.sh get ${blockchainHeightKey})
|
source <(/home/admin/_cache.sh get ${blockchainHeightKey})
|
||||||
@ -195,7 +195,7 @@ if [ "$2" = "info" ]; then
|
|||||||
cl_sync_progress=$(echo "scale=2; $cl_sync_height*100/$blockheight" | bc)
|
cl_sync_progress=$(echo "scale=2; $cl_sync_height*100/$blockheight" | bc)
|
||||||
# needs to be at least "two blocks behind" to be considered not synced
|
# needs to be at least "two blocks behind" to be considered not synced
|
||||||
blockheight=$(($blockheight - 1))
|
blockheight=$(($blockheight - 1))
|
||||||
if [ ${blockheight} -gt ${cl_sync_height} ];then
|
if [ ${blockheight} -gt ${cl_sync_height} ]; then
|
||||||
cl_sync_chain=0
|
cl_sync_chain=0
|
||||||
else
|
else
|
||||||
cl_sync_chain=1
|
cl_sync_chain=1
|
||||||
@ -228,7 +228,7 @@ if [ "$2" = "info" ]; then
|
|||||||
echo "ln_cl_recovery_mode='${cl_recovery_mode}'"
|
echo "ln_cl_recovery_mode='${cl_recovery_mode}'"
|
||||||
echo "ln_cl_recovery_done='${cl_recovery_done}'"
|
echo "ln_cl_recovery_done='${cl_recovery_done}'"
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
######################################################
|
######################################################
|
||||||
@ -241,7 +241,6 @@ if [ "$2" = "wallet" ]; then
|
|||||||
# /usr/local/bin/lightning-cli --lightning-dir=/home/bitcoin/.lightning --conf=/home/bitcoin/.lightning/config listfunds
|
# /usr/local/bin/lightning-cli --lightning-dir=/home/bitcoin/.lightning --conf=/home/bitcoin/.lightning/config listfunds
|
||||||
|
|
||||||
# get data
|
# get data
|
||||||
sudo -u bitcoin
|
|
||||||
command="sudo -u bitcoin $lightningcli_alias listfunds"
|
command="sudo -u bitcoin $lightningcli_alias listfunds"
|
||||||
cl_listfunds=$(${command} 2>/dev/null)
|
cl_listfunds=$(${command} 2>/dev/null)
|
||||||
if [ "${cl_listfunds}" == "" ]; then
|
if [ "${cl_listfunds}" == "" ]; then
|
||||||
@ -251,33 +250,38 @@ if [ "$2" = "wallet" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
ln_walletbalance=0
|
ln_walletbalance=0
|
||||||
for i in $(echo "$cl_listfunds" | jq .outputs[] | jq 'select(.status=="confirmed")' | grep value | awk '{print $2}' | cut -d, -f1);do
|
for i in $(echo "$cl_listfunds" | jq '.outputs[] | select(.status == "confirmed").amount_msat'); do
|
||||||
ln_walletbalance=$((ln_walletbalance+i))
|
sat=$((i / 1000))
|
||||||
|
ln_walletbalance=$((ln_walletbalance + sat))
|
||||||
done
|
done
|
||||||
ln_walletbalance_wait=0
|
ln_walletbalance_wait=0
|
||||||
for i in $(echo "$cl_listfunds" | jq .outputs[] | jq 'select(.status=="unconfirmed")' | grep value | awk '{print $2}' | cut -d, -f1);do
|
for i in $(echo "$cl_listfunds" | jq '.outputs[] | select(.status == "unconfirmed").amount_msat'); do
|
||||||
ln_walletbalance_wait=$((ln_walletbalance_wait+i))
|
sat=$((i / 1000))
|
||||||
|
ln_walletbalance_wait=$((ln_walletbalance_wait + sat))
|
||||||
done
|
done
|
||||||
ln_closedchannelbalance=0
|
ln_closedchannelbalance=0
|
||||||
for i in $(echo "$cl_listfunds" | jq .channels[] | jq 'select(.state=="ONCHAIN")' | grep channel_sat | awk '{print $2}' | cut -d, -f1);do
|
for i in $(echo "$cl_listfunds" | jq -r '.channels[] | select(.state=="ONCHAIN") | .our_amount_msat'); do
|
||||||
ln_closedchannelbalance=$((ln_closedchannelbalance+i))
|
sat=$((i / 1000))
|
||||||
|
ln_closedchannelbalance=$((ln_closedchannelbalance + sat))
|
||||||
done
|
done
|
||||||
ln_pendingonchain=$((ln_walletbalance_wait+ln_closedchannelbalance))
|
ln_pendingonchain=$((ln_walletbalance_wait + ln_closedchannelbalance))
|
||||||
if [ ${#ln_pendingonchain} -gt 0 ]; then ln_pendingonchain="(+${ln_pendingonchain})"; fi
|
if [ ${#ln_pendingonchain} -gt 0 ]; then ln_pendingonchain="(+${ln_pendingonchain})"; fi
|
||||||
ln_channelbalance=0
|
ln_channelbalance=0
|
||||||
for i in $(echo "$cl_listfunds" |jq .channels[]|jq 'select(.state=="CHANNELD_NORMAL")'|grep channel_sat|awk '{print $2}'|cut -d, -f1);do
|
for i in $(echo "$cl_listfunds" | jq -r '.channels[] | select(.state=="CHANNELD_NORMAL") | .our_amount_msat'); do
|
||||||
ln_channelbalance=$((ln_channelbalance+i))
|
sat=$((i / 1000))
|
||||||
|
ln_channelbalance=$((ln_channelbalance + sat))
|
||||||
done
|
done
|
||||||
if [ ${#ln_channelbalance} -eq 0 ];then
|
if [ ${#ln_channelbalance} -eq 0 ]; then
|
||||||
ln_channelbalance=0
|
ln_channelbalance=0
|
||||||
fi
|
fi
|
||||||
ln_channelbalance_all=0
|
ln_channelbalance_all=0
|
||||||
for i in $(echo "$cl_listfunds" |jq .channels[]|grep channel_sat|awk '{print $2}'|cut -d, -f1);do
|
for i in $(echo "$cl_listfunds" | jq -r '.channels[] | .our_amount_msat'); do
|
||||||
ln_channelbalance_all=$((ln_channelbalance_all+i))
|
sat=$((i / 1000))
|
||||||
|
ln_channelbalance_all=$((ln_channelbalance_all + sat))
|
||||||
done
|
done
|
||||||
ln_channelbalance_pending=$((ln_channelbalance_all-ln_channelbalance-ln_closedchannelbalance))
|
ln_channelbalance_pending=$((ln_channelbalance_all - ln_channelbalance - ln_closedchannelbalance))
|
||||||
if [ ${#ln_channelbalance_pending} -gt 0 ]; then ln_channelbalance_pending=" (+${ln_channelbalance_pending})"; fi
|
if [ ${#ln_channelbalance_pending} -gt 0 ]; then ln_channelbalance_pending=" (+${ln_channelbalance_pending})"; fi
|
||||||
|
|
||||||
# print data
|
# print data
|
||||||
echo "ln_cl_wallet_onchain_balance='${ln_walletbalance//[^0-9.]/}'"
|
echo "ln_cl_wallet_onchain_balance='${ln_walletbalance//[^0-9.]/}'"
|
||||||
echo "ln_cl_wallet_onchain_pending='${ln_pendingonchain//[^0-9.]/}'"
|
echo "ln_cl_wallet_onchain_pending='${ln_pendingonchain//[^0-9.]/}'"
|
||||||
|
@ -142,7 +142,7 @@ if [ "$1" = on ]; then
|
|||||||
if [ ! -f /home/bitcoin/c-lightning-REST/cl-rest.js ]; then
|
if [ ! -f /home/bitcoin/c-lightning-REST/cl-rest.js ]; then
|
||||||
cd /home/bitcoin || exit 1
|
cd /home/bitcoin || exit 1
|
||||||
sudo -u bitcoin git clone https://github.com/saubyk/c-lightning-REST
|
sudo -u bitcoin git clone https://github.com/saubyk/c-lightning-REST
|
||||||
cd c-lightning-REST || exit 1
|
cd /home/bitcoin/c-lightning-REST || exit 1
|
||||||
sudo -u bitcoin git reset --hard $CLRESTVERSION
|
sudo -u bitcoin git reset --hard $CLRESTVERSION
|
||||||
|
|
||||||
sudo -u bitcoin /home/admin/config.scripts/blitz.git-verify.sh \
|
sudo -u bitcoin /home/admin/config.scripts/blitz.git-verify.sh \
|
||||||
@ -152,8 +152,11 @@ if [ "$1" = on ]; then
|
|||||||
sudo -u bitcoin npm install
|
sudo -u bitcoin npm install
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd /home/bitcoin/c-lightning-REST || exit 1
|
# copy clrest to a CLNETWORK subdir to make parallel networks possible
|
||||||
sudo -u bitcoin mkdir ${CLNETWORK}
|
sudo -u bitcoin mkdir /home/bitcoin/c-lightning-REST/${CLNETWORK}
|
||||||
|
sudo -u bitcoin cp -r /home/bitcoin/c-lightning-REST/* \
|
||||||
|
/home/bitcoin/c-lightning-REST/${CLNETWORK}
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
{
|
{
|
||||||
\"PORT\": ${portprefix}6100,
|
\"PORT\": ${portprefix}6100,
|
||||||
@ -162,12 +165,7 @@ if [ "$1" = on ]; then
|
|||||||
\"EXECMODE\": \"production\",
|
\"EXECMODE\": \"production\",
|
||||||
\"LNRPCPATH\": \"/home/bitcoin/.lightning/${CLNETWORK}/lightning-rpc\",
|
\"LNRPCPATH\": \"/home/bitcoin/.lightning/${CLNETWORK}/lightning-rpc\",
|
||||||
\"RPCCOMMANDS\": [\"*\"]
|
\"RPCCOMMANDS\": [\"*\"]
|
||||||
}" | sudo -u bitcoin tee ./${CLNETWORK}/cl-rest-config.json
|
}" | sudo -u bitcoin tee /home/bitcoin/c-lightning-REST/${CLNETWORK}/cl-rest-config.json || exit 1
|
||||||
|
|
||||||
# copy clrest to a CLNETWORK subdir to make parallel networks possible
|
|
||||||
sudo -u bitcoin mkdir /home/bitcoin/c-lightning-REST/${CLNETWORK}
|
|
||||||
sudo -u bitcoin cp -r /home/bitcoin/c-lightning-REST/* \
|
|
||||||
/home/bitcoin/c-lightning-REST/${CLNETWORK}
|
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
# systemd unit for c-lightning-REST for ${CHAIN}
|
# systemd unit for c-lightning-REST for ${CHAIN}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# command info
|
# command info
|
||||||
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ];then
|
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
||||||
echo "# Usage:"
|
echo "# Usage:"
|
||||||
echo "# source <(/home/admin/config.scripts/network.aliases.sh getvars <lnd|cl> <mainnet|testnet|signet>)"
|
echo "# source <(/home/admin/config.scripts/network.aliases.sh getvars <lnd|cl> <mainnet|testnet|signet>)"
|
||||||
echo "# if no values given uses the default values from the raspiblitz.conf"
|
echo "# if no values given uses the default values from the raspiblitz.conf"
|
||||||
@ -18,20 +18,20 @@ if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ];then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$1" = getvars ];then
|
if [ "$1" = getvars ]; then
|
||||||
|
|
||||||
source /home/admin/raspiblitz.info
|
source /home/admin/raspiblitz.info
|
||||||
source /mnt/hdd/raspiblitz.conf 2>/dev/null
|
source /mnt/hdd/raspiblitz.conf 2>/dev/null
|
||||||
|
|
||||||
if [ ${#network} -eq 0 ];then
|
if [ ${#network} -eq 0 ]; then
|
||||||
network=bitcoin
|
network=bitcoin
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# LNTYPE is: lnd | cl
|
# LNTYPE is: lnd | cl
|
||||||
if [ $# -gt 1 ];then
|
if [ $# -gt 1 ]; then
|
||||||
LNTYPE=$2
|
LNTYPE=$2
|
||||||
else
|
else
|
||||||
if [ ${#lightning} -gt 0 ];then
|
if [ ${#lightning} -gt 0 ]; then
|
||||||
LNTYPE=${lightning}
|
LNTYPE=${lightning}
|
||||||
else
|
else
|
||||||
LNTYPE=lnd
|
LNTYPE=lnd
|
||||||
@ -44,30 +44,30 @@ if [ "$1" = getvars ];then
|
|||||||
chain=main
|
chain=main
|
||||||
fi
|
fi
|
||||||
# CHAIN is: signet | testnet | mainnet
|
# CHAIN is: signet | testnet | mainnet
|
||||||
if [ $# -gt 2 ]&&[ "$3" != net ]&&[ "$3" != "" ];then
|
if [ $# -gt 2 ] && { [ "$3" = "signet" ] || [ "$3" = "testnet" ] || [ "$3" = "mainnet" ]; }; then
|
||||||
CHAIN=$3
|
CHAIN=$3
|
||||||
chain=${CHAIN::-3}
|
chain=${CHAIN::-3}
|
||||||
else
|
else
|
||||||
CHAIN=${chain}net
|
CHAIN=${chain}net
|
||||||
fi
|
fi
|
||||||
echo "CHAIN=${chain}net"
|
echo "CHAIN=${CHAIN}"
|
||||||
echo "chain=${chain}"
|
echo "chain=${chain}"
|
||||||
|
|
||||||
# netprefix is: "" | t | s
|
# netprefix is: "" | t | s
|
||||||
# portprefix is: "" | 1 | 3
|
# portprefix is: "" | 1 | 3
|
||||||
# L2rpcportmod is: 0 | 1 | 3
|
# L2rpcportmod is: 0 | 1 | 3
|
||||||
# zmqprefix is: 28 | 21 | 23
|
# zmqprefix is: 28 | 21 | 23
|
||||||
if [ "${chain}" == "main" ];then
|
if [ "${chain}" == "main" ]; then
|
||||||
netprefix=""
|
netprefix=""
|
||||||
L2rpcportmod=0
|
L2rpcportmod=0
|
||||||
portprefix=""
|
portprefix=""
|
||||||
zmqprefix=28
|
zmqprefix=28
|
||||||
elif [ "${chain}" == "test" ];then
|
elif [ "${chain}" == "test" ]; then
|
||||||
netprefix="t"
|
netprefix="t"
|
||||||
L2rpcportmod=1
|
L2rpcportmod=1
|
||||||
portprefix=1
|
portprefix=1
|
||||||
zmqprefix=21
|
zmqprefix=21
|
||||||
elif [ "${chain}" == "sig" ];then
|
elif [ "${chain}" == "sig" ]; then
|
||||||
netprefix="s"
|
netprefix="s"
|
||||||
L2rpcportmod=3
|
L2rpcportmod=3
|
||||||
portprefix=3
|
portprefix=3
|
||||||
@ -78,9 +78,9 @@ if [ "$1" = getvars ];then
|
|||||||
echo "L2rpcportmod=${L2rpcportmod}"
|
echo "L2rpcportmod=${L2rpcportmod}"
|
||||||
echo "zmqprefix=${zmqprefix}"
|
echo "zmqprefix=${zmqprefix}"
|
||||||
|
|
||||||
if [ "${LNTYPE}" == "cl" ];then
|
if [ "${LNTYPE}" == "cl" ]; then
|
||||||
# CLNETWORK is: bitcoin / signet / testnet
|
# CLNETWORK is: bitcoin / signet / testnet
|
||||||
if [ "${chain}" == "main" ];then
|
if [ "${chain}" == "main" ]; then
|
||||||
CLNETWORK=${network}
|
CLNETWORK=${network}
|
||||||
else
|
else
|
||||||
CLNETWORK=${chain}net
|
CLNETWORK=${chain}net
|
||||||
@ -100,7 +100,7 @@ if [ "$1" = getvars ];then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# typeprefix is: "" | c
|
# typeprefix is: "" | c
|
||||||
if [ "${LNTYPE}" == "lnd" ];then
|
if [ "${LNTYPE}" == "lnd" ]; then
|
||||||
typeprefix=''
|
typeprefix=''
|
||||||
lndConfFile="/mnt/hdd/lnd/${netprefix}lnd.conf"
|
lndConfFile="/mnt/hdd/lnd/${netprefix}lnd.conf"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user