I am using a Raspberry Pi 2 to show a webpage, using Midori, that shows the information given after invoking a webservice each 12 seconds. For some reason, when Raspbian lose Internet connection the webpage keeps showing the last information given. With Epiphany and Chromiun shows an error page as expected. Anyway, I included a script that checks the Internet connection very 2 minutes and if the connection is down then the webpage is refreshed. So the error page is shown.
How can I detect that the Internet connection is back again and refresh the webpage?
I am using UMTSkeeper to keep internet connection alive.
This is my script to refresh the webpage when connection is down.
ping -c4 192.168.1.1 > /dev/null if [ $? != 0 ] then export DISPLAY=:0 XAUTHORITY=/home/pi/.Xauthority xdotool search --onlyvisible --class midori windowsactivate xdotool key F5 fi