You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got some improvements on the sys-ssh-jump service, I like to share this for improvement of the repo. The improvement will make sleeps obsolete and it will just wait for internet connection. Also added an extra function that seemed handy in my case because i used a USB LTE modem that sometimes lost it's connectivity and needed a power cycle. The following project is used for that https://github.com/mvp/uhubctl (Also installable with apt-get)
function is_online() {
echo -e "GET http://google.com HTTP/1.0\n\n" | nc google.com 80 > /dev/null 2>&1
if [ $? -eq 0 ]; then
echo "Redpi has internet"
result=1
else
result=0
fi
}
function wait_for_internet() {
is_online
while [ $result -eq 0 ]; do
is_online
done
}
function reset_usb_lte() {
is_online
if [ $result -eq 0 ];then
# Power cycle the usb ports on the pi
uhubctl -a 2 -l 2
# Loop till we got internet
wait_for_internet
fi
}
The text was updated successfully, but these errors were encountered:
Greetings,
First thank you for the submission. Second could you checkout the next-4.x branch and make a pull request (pr) so I can see exactly how you applied these. The pr will allow for easy integration, testing, and will clearly give you credit for your work.
I got some improvements on the sys-ssh-jump service, I like to share this for improvement of the repo. The improvement will make sleeps obsolete and it will just wait for internet connection. Also added an extra function that seemed handy in my case because i used a USB LTE modem that sometimes lost it's connectivity and needed a power cycle. The following project is used for that https://github.com/mvp/uhubctl (Also installable with apt-get)
The text was updated successfully, but these errors were encountered: