#4449 Fix features bug (#4762)

* on switching to CLN only restart blitzapi if needed
* #4449 fix parsing of ln address
This commit is contained in:
/rootzoll 2024-10-02 11:32:57 +02:00 committed by GitHub
parent c09158ca14
commit 3b821a3c7c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View File

@ -112,7 +112,11 @@ case $CHOICE in
echo
# setting value in the raspiblitz.conf
/home/admin/config.scripts/blitz.conf.sh set lightning "cl"
sudo systemctl restart blitzapi 2>/dev/null
# when raspiblitz api is active - trigger a restart
if systemctl list-unit-files --type=service | grep -Fq 'blitzapi.service'; then
echo "# Restarting the blitzapi ..."
sudo systemctl restart blitzapi
fi
echo "# OK - lightning=cl is set in /mnt/hdd/raspiblitz.conf"
echo
echo "Press ENTER to return to main menu."

View File

@ -162,7 +162,7 @@ if [ "$2" = "info" ]; then
fi
# parse data
lnd_address=$(echo "${ln_getInfo}" | grep "uris" -A 1 | tr -d '\n' | cut -d '"' -f4)
lnd_address=$(echo "${ln_getInfo}" | jq -r '.uris[0]')
lnd_tor=$(echo "${lnd_address}" | grep -c ".onion")
lnd_sync_chain=$(echo "${ln_getInfo}" | grep "synced_to_chain" | grep "true" -c)
lnd_sync_graph=$(echo "${ln_getInfo}" | grep "synced_to_graph" | grep "true" -c)