2 LuCI - Lua Configuration Interface
4 Copyright 2008 Steven Barth <steven@midlink.org>
5 Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
11 http://www.apache.org/licenses/LICENSE-2.0
15 m = Map("upnpd", translate("Universal Plug & Play"), translate("UPNP allows clients in the local network to automatically configure the router."))
17 s = m:section(NamedSection, "config", "upnpd", "")
20 e = s:option(Flag, "enabled", translate("enable"))
23 function e.write(self, section, value)
24 local cmd = (value == "1") and "enable" or "disable"
26 os.execute("/etc/init.d/miniupnpd stop")
28 os.execute("/etc/init.d/miniupnpd " .. cmd)
31 function e.cfgvalue(self, section)
32 return (os.execute("/etc/init.d/miniupnpd enabled") == 0) and "1" or "0"
35 s:option(Flag, "secure_mode", translate("Enable secure mode")).rmempty = true
36 s:option(Flag, "log_output", translate("Log output")).rmempty = true
37 s:option(Value, "download", translate("Downlink"), "kByte/s").rmempty = true
38 s:option(Value, "upload", translate("Uplink"), "kByte/s").rmempty = true