mynode/rootfs/standard/usr/bin/wait_on_lnd.sh
2019-06-15 18:02:44 -05:00

11 lines
333 B
Bash
Executable File

#!/bin/bash
# Wait until lnd is synced
echo "Checking if LND is synced..."
lncli --lnddir /mnt/hdd/mynode/lnd getinfo | grep 'synced_to_chain": true'
while [ ! $? ]; do
echo "LND not synced, sleeping for 60 seconds..."
/bin/sleep 60s
lncli --lnddir /mnt/hdd/mynode/lnd getinfo | grep 'synced_to_chain": true'
done
exit 0