Add initial luci-app-fwknopd - a way to control the firewall knock daemon from luci
[project/luci.git] / applications / luci-app-fwknopd / luasrc / controller / fwknopd.lua
diff --git a/applications/luci-app-fwknopd/luasrc/controller/fwknopd.lua b/applications/luci-app-fwknopd/luasrc/controller/fwknopd.lua
new file mode 100644 (file)
index 0000000..069a77e
--- /dev/null
@@ -0,0 +1,15 @@
+-- Copyright 2015 Jonathan Bennett <jbennett@incomsystems.biz>
+-- Licensed to the public under the GNU General Public License v2.
+
+module("luci.controller.fwknopd", package.seeall)
+
+function index()
+       if not nixio.fs.access("/etc/config/fwknopd") then
+               return
+       end
+
+       local page
+
+       page = entry({"admin", "services", "fwknopd"}, cbi("fwknopd"), _("Firewall Knock Daemon"))
+       page.dependent = true
+end