This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Reset Router when Internet lost
#3
(31.03.2021, 08:19)Daniel. Wrote: Not sure if this is correct approach but you could try ping google.com. Use this script, you will get 0 on success.
Code:
ip = 'google.com'
res = os.execute('ping -c 2 -W 1 ' .. ip)
log(res)

Thanks! So I did this:

Code:
ip = '192.168.0.1'
res = os.execute('ping -c 2 -W 1 ' .. ip)
if (res == 1) then
  log("Reboot due to VPN down")
  grp.write('4/1/2', false)
  os.sleep(1.5)
  grp.write('4/1/2', true)
end
Reply


Messages In This Thread
RE: Reset Router when Internet lost - by managementboy - 06.04.2021, 07:31

Forum Jump: