<%# updateFW.htm -%> <% local has_ping6 = fs.access("/bin/ping6") or fs.access("/usr/bin/ping6") local has_traceroute6 = fs.access("/usr/bin/traceroute6") local dns_host = "www.ingeteam.com" local ping_host = "www.ingeteam.com" local route_host = "www.ingeteam.com" local chp = require "luci.model.charging_points" local path = luci.dispatcher.context.requestpath local user, serialnumber, hw_model = chp.whoami(path) local cl = path[1] local fs = require "nixio.fs" local utl = require "luci.util" local mUtl = require "luci.moreUtils" local sn = mUtl.get_serialnumber() local model = mUtl.model(path[4] or sn) local mod = require "luci.model.global_variables" local url local opts = utl.ubus("uci", "get", {config = "swupdated", section = "common", option = "auto_expr" }) if opts and opts.value then opts = opts.value end local selected if opts == "0 0 0 * * *" then selected = 1 elseif opts == "0 0 0 */15 * *" then selected = 2 elseif opts == "0 0 0 1 * *" then selected = 3 elseif opts == "0 0 0 1 */3 *" then selected = 4 elseif opts == "0 0 0 1 */6 *" then selected = 5 elseif opts == "0 0 0 1 1 *" then selected = 6 end local opts = utl.ubus("uci", "get", {config = "swupdated", section = "common", option = "automagically" }) if opts and opts.value then opts = opts.value end if opts == "off" then selected = 7 end if mod.url then local servers = mod.url url = servers[model] or "http://ingerev.com/feeds/abw0001/xenial//Packages" end local master = mUtl.identify_pseudo_maestre(sn) local swupdate = utl.ubus("swupdated", "get_configuration") local checked_d, checked_c, checked = false , show if swupdate and swupdate.url then if url == swupdate.url then checked = true checked_d = "checked" checked_c = "" show = "none" else checked_c = "checked" checked_d = "" show = "flex" end end local swupdate_url if swupdate and swupdate.url then swupdate_url = swupdate.url else swupdate_url = "" end -%> <%+header%>

<%:Update Firmware%>

<%=translate("Upgrade the system here ")%>


help<%=translate("All devices will be updated with the latest version of the server.")%>

" id="save_frecuency" onclick="saveFrecuency()"/>
<%:Check internet connection%>
<%=translate("Here you can check internet connection to make sure you can reach the server, a common test is to check google dns server (8.8.8.8) connection")%>

<% if has_ping6 then %> <% else %> <% end %>


<%+footer%>