% --[[ backend_local.htm (Charging_points module) ]]-- local fs = require "nixio.fs" local utl = require "luci.util" local mUtl = require "luci.moreUtils" local path = luci.dispatcher.context.requestpath local sn = mUtl.get_serialnumber() local master = mUtl.identify_pseudo_maestre(path[4] or sn) local method , wizard if master == true then method = "localbackend" wizard = "wizard" else method = path[4].."/localbackend" wizard = path[4].."/wizard" end local list = utl.ubus(method, "show_uid_list") local cl = path[1] local active = utl.ubus(wizard, "active_service", {service = "localbackend"}) local button, val if active and active.enabled and active.enabled == "true" then active = true button = "reset" val = "Disable" elseif active and active.enabled and active.enabled == "false" then active = false button = "enable" val = "Enable" end %> <%+header%>