luci-app-adblock: User interface for the 'adblock' package
[project/luci.git] / applications / luci-app-adblock / luasrc / controller / adblock.lua
diff --git a/applications/luci-app-adblock/luasrc/controller/adblock.lua b/applications/luci-app-adblock/luasrc/controller/adblock.lua
new file mode 100644 (file)
index 0000000..d8b4718
--- /dev/null
@@ -0,0 +1,12 @@
+-- Copyright 2016 Openwrt.org
+-- Licensed to the public under the Apache License 2.0.
+
+module("luci.controller.adblock", package.seeall)
+
+function index()
+       if not nixio.fs.access("/etc/config/adblock") then
+               return
+       end
+
+       entry({"admin", "services", "adblock"}, cbi("adblock"), _("Adblock"), 40)
+end