PKG_MAINTAINER:=Stan Grishin <stangri@melmac.net>
LUCI_TITLE:=Simple Adblock Web UI
-LUCI_DEPENDS:=+simple-adblock
+LUCI_DESCRIPTION:=Provides Web UI for simple-adblock service.
+LUCI_DEPENDS:=+luci +simple-adblock
LUCI_PKGARCH:=all
-PKG_RELEASE:=2
+PKG_RELEASE:=5
include ../../luci.mk
s = m:section(NamedSection, "config", "simple-adblock")
-- General options
-e = s:option(Flag, "enabled", translate("Enable/start service"))
+e = s:option(Flag, "enabled", translate("Start Simple Adblock service"))
e.rmempty = false
-
-function e.cfgvalue(self, section)
- return self.map:get(section, "enabled") == "1" and luci.sys.init.enabled("simple-adblock") and self.enabled or self.disabled
-end
-
function e.write(self, section, value)
- if value == "1" then
- luci.sys.call("/etc/init.d/simple-adblock enable >/dev/null")
- luci.sys.call("/etc/init.d/simple-adblock start >/dev/null")
- else
- luci.sys.call("/etc/init.d/simple-adblock stop >/dev/null")
+ if value ~= "1" then
+ luci.sys.init.stop("simple-adblock")
end
return Flag.write(self, section, value)
end
o3.rmempty = false
o3.default = 1
-
local sysfs_path = "/sys/class/leds/"
local leds = {}
if nixio.fs.access(sysfs_path) then
end
end
-
s2 = m:section(NamedSection, "config", "simple-adblock")
-- Whitelisted Domains
d1 = s2:option(DynamicList, "whitelist_domain", translate("Whitelisted Domains"), translate("Individual domains to be whitelisted"))