Fix issue parsing lncli output

This commit is contained in:
Taylor Helsper 2023-11-05 16:25:50 -06:00
parent 1f79cd0b47
commit 0be0181ed8

View File

@ -9,11 +9,11 @@ fi
# Wait until lnd is synced
echo "Checking if LND is synced..."
lncli --network=$NETWORK --lnddir /mnt/hdd/mynode/lnd getinfo | grep 'synced_to_chain": true'
lncli --network=$NETWORK --lnddir /mnt/hdd/mynode/lnd getinfo | grep 'synced_to_chain":\s*true'
while [ $? -ne 0 ]; do
echo "LND not synced, sleeping for 60 seconds..."
/bin/sleep 60s
lncli --network=$NETWORK --lnddir /mnt/hdd/mynode/lnd getinfo | grep 'synced_to_chain": true'
lncli --network=$NETWORK --lnddir /mnt/hdd/mynode/lnd getinfo | grep 'synced_to_chain":\s*true'
done
echo "LND is ready."
exit 0