Browse Source

fix lnd init startup wait

#146
rootzoll 7 years ago
parent
commit
0afcb290b6
  1. 25
      home.admin/70initLND.sh

25
home.admin/70initLND.sh

@ -75,21 +75,22 @@ if [ ${lndRunning} -eq 0 ]; then
sudo chmod +x /etc/systemd/system/lnd.service sudo chmod +x /etc/systemd/system/lnd.service
sudo systemctl enable lnd sudo systemctl enable lnd
sudo systemctl start lnd sudo systemctl start lnd
echo "Started LND .. waiting 60 seconds for init ..." echo "Starting LND ... give 120 seconds to init."
sleep 60 sleep 120
fi fi
###### Check LND is running ###### Check LND is running
lndRunning=$(systemctl status lnd.service | grep -c running) lndRunning=0
if [ ${lndRunning} -eq 0 ]; then while [ ${lndRunning} -eq 0 ]
echo "!!!!!!!!!!!!!!!!!!!!!!!!!" do
echo "FAIL - LND is not running" lndRunning=$(systemctl status lnd.service | grep -c running)
echo "check: systemctl status lnd.service" if [ ${lndRunning} -eq 0 ]; then
echo "check: sudo journalctl -f" date +%s
echo "recheck with original tutorial -->" echo "LND not ready yet ... waiting another 60 seconds."
echo "https://github.com/Stadicus/guides/blob/master/raspibolt/raspibolt_40_lnd.md" echo "If this takes too long (more then 10min total) --> CTRL+c and report Problem"
exit 1 sleep 60
fi fi
done
echo "OK - LND is running" echo "OK - LND is running"
echo "" echo ""

Loading…
Cancel
Save