lnbits: Wait for CLN RPC socket to become available before (#4931)

allowing lnbits to start up. This avoids a VoidWallet being
activated, requiringt the user to manually restart lnbits
whenever CLN is restarted.
This commit is contained in:
Chris Guida
2025-05-13 18:56:35 -06:00
committed by GitHub
parent eb2d2dc43e
commit 002114eebd

View File

@@ -585,6 +585,12 @@ if [ "$1" = "prestart" ]; then
exit 1
fi
CLIGHTNING_RPC=$(grep '^CLIGHTNING_RPC=' ${lnbitsConfig} | cut -d'=' -f2-)
while ! lightning-cli --rpc-file=${CLIGHTNING_RPC} getinfo &> /dev/null; do
echo "Waiting for CLN RPC socket to become available..."
sleep 1
done
echo "# everything looks OK for lnbits config on CLN on ${LNBitsChain}net"
else