From 6aa6b3b7ebae9f295c06d1fa859c1cf9bf2e979b Mon Sep 17 00:00:00 2001 From: Manuel Munz Date: Thu, 10 Feb 2011 14:58:44 +0000 Subject: applications/luci-olsr-services: Move services away from mod-freifunk and make it seperate app instead. --- .../luci-olsr-services/luasrc/controller/services.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 applications/luci-olsr-services/luasrc/controller/services.lua (limited to 'applications/luci-olsr-services/luasrc/controller/services.lua') diff --git a/applications/luci-olsr-services/luasrc/controller/services.lua b/applications/luci-olsr-services/luasrc/controller/services.lua new file mode 100644 index 0000000000..cc1a2f62e8 --- /dev/null +++ b/applications/luci-olsr-services/luasrc/controller/services.lua @@ -0,0 +1,17 @@ +module "luci.controller.services" + +function index() + local uci = require "luci.model.uci".cursor() + local i18n = luci.i18n.translate + + uci:foreach("olsrd", "LoadPlugin", function(s) + if s.library == "olsrd_nameservice.so.0.3" then + has_serv = true + end + end) + + if has_serv then + entry({"freifunk", "services"}, template("freifunk-services/services"), i18n("Services"), 60) + end +end + -- cgit v1.2.3