diff options
Diffstat (limited to 'applications/luci-app-upnp')
-rw-r--r-- | applications/luci-app-upnp/luasrc/model/cbi/upnp/upnp.lua | 12 | ||||
-rwxr-xr-x | applications/luci-app-upnp/root/etc/uci-defaults/40_luci-miniupnp | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/applications/luci-app-upnp/luasrc/model/cbi/upnp/upnp.lua b/applications/luci-app-upnp/luasrc/model/cbi/upnp/upnp.lua index f1bb450dd5..74b9d1d033 100644 --- a/applications/luci-app-upnp/luasrc/model/cbi/upnp/upnp.lua +++ b/applications/luci-app-upnp/luasrc/model/cbi/upnp/upnp.lua @@ -12,21 +12,21 @@ s.addremove = false s:tab("general", translate("General Settings")) s:tab("advanced", translate("Advanced Settings")) -e = s:taboption("general", Flag, "_init", translate("Start UPnP and NAT-PMP service")) +e = s:taboption("general", Flag, "enabled", translate("Start UPnP and NAT-PMP service")) e.rmempty = false -function e.cfgvalue(self, section) - return luci.sys.init.enabled("miniupnpd") and self.enabled or self.disabled -end +--function e.cfgvalue(self, section) +-- return luci.sys.init.enabled("miniupnpd") and self.enabled or self.disabled +--end function e.write(self, section, value) if value == "1" then - luci.sys.call("/etc/init.d/miniupnpd enable >/dev/null") luci.sys.call("/etc/init.d/miniupnpd start >/dev/null") else luci.sys.call("/etc/init.d/miniupnpd stop >/dev/null") - luci.sys.call("/etc/init.d/miniupnpd disable >/dev/null") end + + return Flag.write(self, section, value) end s:taboption("general", Flag, "enable_upnp", translate("Enable UPnP functionality")).default = "1" diff --git a/applications/luci-app-upnp/root/etc/uci-defaults/40_luci-miniupnp b/applications/luci-app-upnp/root/etc/uci-defaults/40_luci-miniupnp index a338c75d35..e9636f9a28 100755 --- a/applications/luci-app-upnp/root/etc/uci-defaults/40_luci-miniupnp +++ b/applications/luci-app-upnp/root/etc/uci-defaults/40_luci-miniupnp @@ -3,7 +3,7 @@ uci -q batch <<-EOF >/dev/null delete ucitrack.@upnpd[-1] add ucitrack upnpd - set ucitrack.@upnpd[-1]=miniupnpd + set ucitrack.@upnpd[-1].init=miniupnpd commit ucitrack EOF |