Browse Source

fix lnd init startup wait

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

19
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=0
while [ ${lndRunning} -eq 0 ]
do
lndRunning=$(systemctl status lnd.service | grep -c running) lndRunning=$(systemctl status lnd.service | grep -c running)
if [ ${lndRunning} -eq 0 ]; then if [ ${lndRunning} -eq 0 ]; then
echo "!!!!!!!!!!!!!!!!!!!!!!!!!" date +%s
echo "FAIL - LND is not running" echo "LND not ready yet ... waiting another 60 seconds."
echo "check: systemctl status lnd.service" echo "If this takes too long (more then 10min total) --> CTRL+c and report Problem"
echo "check: sudo journalctl -f" sleep 60
echo "recheck with original tutorial -->"
echo "https://github.com/Stadicus/guides/blob/master/raspibolt/raspibolt_40_lnd.md"
exit 1
fi fi
done
echo "OK - LND is running" echo "OK - LND is running"
echo "" echo ""

Loading…
Cancel
Save