mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-11-18 18:07:45 +01:00
detect internet on setup
This commit is contained in:
@@ -383,7 +383,6 @@ What you do is in priciple:
|
|||||||
|
|
||||||
This is highly experimental. And again: If you restore the LND with an backup that is not representing the latest channel state, this will trigger the lightning "penalty" mechanism - allowing your channel counter part to grab all the funds from a channel. Its a measure of last resort. But if its working for you, let us know.
|
This is highly experimental. And again: If you restore the LND with an backup that is not representing the latest channel state, this will trigger the lightning "penalty" mechanism - allowing your channel counter part to grab all the funds from a channel. Its a measure of last resort. But if its working for you, let us know.
|
||||||
|
|
||||||
|
|
||||||
## Mobile Development: Connect RaspiBlitz without a Router/Switch
|
## Mobile Development: Connect RaspiBlitz without a Router/Switch
|
||||||
|
|
||||||
To connect a RaspiBlitz directly (without a router/switch) to your laptop and share the WIFI internet connection, you can follow this [guide for OSX](https://medium.com/@tzhenghao/how-to-ssh-into-your-raspberry-pi-with-a-mac-and-ethernet-cable-636a197d055). In short:
|
To connect a RaspiBlitz directly (without a router/switch) to your laptop and share the WIFI internet connection, you can follow this [guide for OSX](https://medium.com/@tzhenghao/how-to-ssh-into-your-raspberry-pi-with-a-mac-and-ethernet-cable-636a197d055). In short:
|
||||||
|
|||||||
@@ -73,8 +73,14 @@ while :
|
|||||||
# before setup even started
|
# before setup even started
|
||||||
if [ ${setupStep} -eq 0 ]; then
|
if [ ${setupStep} -eq 0 ]; then
|
||||||
|
|
||||||
|
# check for internet connection
|
||||||
|
# https://en.wikipedia.org/wiki/1.1.1.1
|
||||||
|
online=$(ping 1.1.1.1 -c 1 -W 2 | grep -c '1 received')
|
||||||
|
if [ ${online} -eq 0 ]; then
|
||||||
|
message="no internet connection"
|
||||||
|
|
||||||
# when in presync - get more info on progress
|
# when in presync - get more info on progress
|
||||||
if [ "${state}" = "presync" ]; then
|
elif [ "${state}" = "presync" ]; then
|
||||||
# get blockchain sync progress
|
# get blockchain sync progress
|
||||||
blockchaininfo="$(sudo -u root bitcoin-cli -conf=/home/admin/assets/bitcoin.conf getblockchaininfo 2>/dev/null)"
|
blockchaininfo="$(sudo -u root bitcoin-cli -conf=/home/admin/assets/bitcoin.conf getblockchaininfo 2>/dev/null)"
|
||||||
message="starting"
|
message="starting"
|
||||||
@@ -83,15 +89,13 @@ while :
|
|||||||
message=$(echo "${message}*100" | bc)
|
message=$(echo "${message}*100" | bc)
|
||||||
message="${message}%"
|
message="${message}%"
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
# when old data - improve message
|
# when old data - improve message
|
||||||
if [ "${state}" = "olddata" ]; then
|
elif [ "${state}" = "olddata" ]; then
|
||||||
message="login for manual migration"
|
message="login for manual migration"
|
||||||
fi
|
|
||||||
|
|
||||||
# when no HDD - improve message
|
# when no HDD - improve message
|
||||||
if [ "${state}" = "nohdd" ]; then
|
elif [ "${state}" = "nohdd" ]; then
|
||||||
message="Connect HHD"
|
message="Connect HHD"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user