2 LuCI - Lua Configuration Interface
4 Copyright 2008 Steven Barth <steven@midlink.org>
5 Copyright 2008-2010 Jo-Philipp Wich <xm@subsignal.org>
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
16 m = Map("upnpd", translate("Universal Plug & Play"),
17 translate("UPnP allows clients in the local network to automatically configure the router."))
19 m:section(SimpleSection).template = "upnp_status"
21 s = m:section(NamedSection, "config", "upnpd", "")
24 e = s:option(Flag, "enabled", translate("Enable UPnP Service"))
29 function e.write(self, section, value)
31 luci.sys.call("/etc/init.d/miniupnpd enable")
32 luci.sys.call("/etc/init.d/miniupnpd start")
34 luci.sys.call("/etc/init.d/miniupnpd stop")
35 luci.sys.call("/etc/init.d/miniupnpd disable")
38 Value.write(self, section, value)
41 s:option(Flag, "enable_natpmp", translate("Enable NAT-PMP")).rmempty = true
42 s:option(Flag, "secure_mode", translate("Enable secure mode")).rmempty = true
43 s:option(Flag, "log_output", translate("Log output")).rmempty = true
44 s:option(Value, "download", translate("Downlink"), "kByte/s").rmempty = true
45 s:option(Value, "upload", translate("Uplink"), "kByte/s").rmempty = true