Added new applications luci-ddns to luci-full and luci-mini
This commit is contained in:
parent
d9bcb87608
commit
5c419acf92
7 changed files with 192 additions and 1 deletions
2
applications/luci-ddns/Makefile
Normal file
2
applications/luci-ddns/Makefile
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
include ../../build/config.mk
|
||||||
|
include ../../build/module.mk
|
32
applications/luci-ddns/luasrc/controller/ddns.lua
Normal file
32
applications/luci-ddns/luasrc/controller/ddns.lua
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
--[[
|
||||||
|
LuCI - Lua Configuration Interface
|
||||||
|
|
||||||
|
Copyright 2008 Steven Barth <steven@midlink.org>
|
||||||
|
Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
$Id$
|
||||||
|
]]--
|
||||||
|
module("luci.controller.ddns", package.seeall)
|
||||||
|
|
||||||
|
function index()
|
||||||
|
require("luci.i18n")
|
||||||
|
luci.i18n.loadc("ddns")
|
||||||
|
if not luci.fs.isfile("/etc/config/ddns") then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local page = entry({"admin", "services", "ddns"}, cbi("ddns/ddns"), luci.i18n.translate("ddns"), 60)
|
||||||
|
page.i18n = "ddns"
|
||||||
|
page.dependent = true
|
||||||
|
|
||||||
|
|
||||||
|
local page = entry({"mini", "network", "ddns"}, cbi("ddns/ddnsmini"), luci.i18n.translate("ddns"), 60)
|
||||||
|
page.i18n = "ddns"
|
||||||
|
page.dependent = true
|
||||||
|
end
|
8
applications/luci-ddns/luasrc/i18n/ddns.de.lua
Normal file
8
applications/luci-ddns/luasrc/i18n/ddns.de.lua
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
ddns = "Dynamisches DNS"
|
||||||
|
ddns_desc = "Dynamisches DNS erlaubt es, den Router bei dynamischer IP-Adresse über einen festen DNS-Namen zu erreichen."
|
||||||
|
ddns_service_ipsource = "Quelle der IP-Adresse"
|
||||||
|
ddns_service_checkinterval = "Teste auf neue IP alle"
|
||||||
|
ddns_service_checkunit = "Test-Zeiteinheit"
|
||||||
|
ddns_service_forceinterval = "Erzwinge Aktualisierung alle"
|
||||||
|
ddns_service_forceunit = "Erzwinge-Zeiteinheit"
|
||||||
|
ddns_service_updateurl = "Eigene Update-URL"
|
8
applications/luci-ddns/luasrc/i18n/ddns.en.lua
Normal file
8
applications/luci-ddns/luasrc/i18n/ddns.en.lua
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
ddns = "Dynamic DNS"
|
||||||
|
ddns_desc = "Dynamic DNS allows that your router can be reached with a fixed hostname while having a dynamically changing IP-Address."
|
||||||
|
ddns_service_ipsource = "Source of IP-Address"
|
||||||
|
ddns_service_checkinterval = "Check for changed IP every"
|
||||||
|
ddns_service_checkunit = "Check-Time unit"
|
||||||
|
ddns_service_forceinterval = "Force update every"
|
||||||
|
ddns_service_forceunit = "Force-Time unit"
|
||||||
|
ddns_service_updateurl = "Custom Update-URL"
|
76
applications/luci-ddns/luasrc/model/cbi/ddns/ddns.lua
Normal file
76
applications/luci-ddns/luasrc/model/cbi/ddns/ddns.lua
Normal file
|
@ -0,0 +1,76 @@
|
||||||
|
--[[
|
||||||
|
LuCI - Lua Configuration Interface
|
||||||
|
|
||||||
|
Copyright 2008 Steven Barth <steven@midlink.org>
|
||||||
|
Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
$Id$
|
||||||
|
]]--
|
||||||
|
m = Map("ddns", translate("ddns"), translate("ddns_desc"))
|
||||||
|
|
||||||
|
s = m:section(TypedSection, "service", "")
|
||||||
|
s.addremove = true
|
||||||
|
|
||||||
|
s:option(Flag, "enabled", translate("enable"))
|
||||||
|
|
||||||
|
svc = s:option(ListValue, "service_name", translate("service"))
|
||||||
|
svc.rmempty = true
|
||||||
|
svc:value("")
|
||||||
|
svc:value("dyndns.org")
|
||||||
|
svc:value("changeip.com")
|
||||||
|
svc:value("zoneedit.com")
|
||||||
|
svc:value("no-ip.com")
|
||||||
|
svc:value("freedns.afraid.org")
|
||||||
|
|
||||||
|
s:option(Value, "domain", translate("hostname")).rmempty = true
|
||||||
|
s:option(Value, "username", translate("username")).rmempty = true
|
||||||
|
s:option(Value, "password", translate("password")).rmempty = true
|
||||||
|
|
||||||
|
src = s:option(ListValue, "ip_source")
|
||||||
|
src:value("network", translate("network"))
|
||||||
|
src:value("interface", translate("interface"))
|
||||||
|
src:value("web", "URL")
|
||||||
|
|
||||||
|
iface = s:option(ListValue, "ip_network", translate("network"))
|
||||||
|
iface:depends("ip_source", "network")
|
||||||
|
iface.rmempty = true
|
||||||
|
luci.model.uci.foreach("network", "interface",
|
||||||
|
function (section)
|
||||||
|
if section[".name"] ~= "loopback" then
|
||||||
|
iface:value(section[".name"])
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
iface = s:option(ListValue, "ip_interface", translate("interface"))
|
||||||
|
iface:depends("ip_source", "interface")
|
||||||
|
iface.rmempty = true
|
||||||
|
for k, v in pairs(luci.sys.net.devices()) do
|
||||||
|
iface:value(v)
|
||||||
|
end
|
||||||
|
|
||||||
|
web = s:option(Value, "ip_url", "URL")
|
||||||
|
web:depends("ip_source", "web")
|
||||||
|
web.rmempty = true
|
||||||
|
|
||||||
|
s:option(Value, "update_url").optional = true
|
||||||
|
|
||||||
|
s:option(Value, "check_interval").default = 10
|
||||||
|
unit = s:option(ListValue, "check_unit")
|
||||||
|
unit.default = "minutes"
|
||||||
|
unit:value("minutes", "min")
|
||||||
|
unit:value("hours", "h")
|
||||||
|
|
||||||
|
s:option(Value, "force_interval").default = 72
|
||||||
|
unit = s:option(ListValue, "force_unit")
|
||||||
|
unit.default = "hours"
|
||||||
|
unit:value("minutes", "min")
|
||||||
|
unit:value("hours", "h")
|
||||||
|
|
||||||
|
|
||||||
|
return m
|
50
applications/luci-ddns/luasrc/model/cbi/ddns/ddnsmini.lua
Normal file
50
applications/luci-ddns/luasrc/model/cbi/ddns/ddnsmini.lua
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
--[[
|
||||||
|
LuCI - Lua Configuration Interface
|
||||||
|
|
||||||
|
Copyright 2008 Steven Barth <steven@midlink.org>
|
||||||
|
Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
$Id$
|
||||||
|
]]--
|
||||||
|
m = Map("ddns", translate("ddns"), translate("ddns_desc"))
|
||||||
|
|
||||||
|
s = m:section(TypedSection, "service", "")
|
||||||
|
s.addremove = true
|
||||||
|
|
||||||
|
s:option(Flag, "enabled", translate("enable"))
|
||||||
|
|
||||||
|
svc = s:option(ListValue, "service_name", translate("service"))
|
||||||
|
svc.rmempty = true
|
||||||
|
svc:value("dyndns.org")
|
||||||
|
svc:value("changeip.com")
|
||||||
|
svc:value("zoneedit.com")
|
||||||
|
svc:value("no-ip.com")
|
||||||
|
svc:value("freedns.afraid.org")
|
||||||
|
|
||||||
|
s:option(Value, "domain", translate("hostname")).rmempty = true
|
||||||
|
s:option(Value, "username", translate("username")).rmempty = true
|
||||||
|
s:option(Value, "password", translate("password")).rmempty = true
|
||||||
|
|
||||||
|
s.defaults.ip_source = "network"
|
||||||
|
s.defaults.ip_network = "wan"
|
||||||
|
|
||||||
|
s:option(Value, "check_interval").default = 10
|
||||||
|
unit = s:option(ListValue, "check_unit")
|
||||||
|
unit.default = "minutes"
|
||||||
|
unit:value("minutes", "min")
|
||||||
|
unit:value("hours", "h")
|
||||||
|
|
||||||
|
s:option(Value, "force_interval").default = 72
|
||||||
|
unit = s:option(ListValue, "force_unit")
|
||||||
|
unit.default = "hours"
|
||||||
|
unit:value("minutes", "min")
|
||||||
|
unit:value("hours", "h")
|
||||||
|
|
||||||
|
|
||||||
|
return m
|
|
@ -426,7 +426,7 @@ endef
|
||||||
define Package/luci-app-ntpc
|
define Package/luci-app-ntpc
|
||||||
$(call Package/luci/webtemplate)
|
$(call Package/luci/webtemplate)
|
||||||
DEPENDS+=+luci-mod-admin-core +ntpclient
|
DEPENDS+=+luci-mod-admin-core +ntpclient
|
||||||
TITLE:=NTP time synchronisation client configuration
|
TITLE:=NTP time synchronisation client configuration module
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/luci-app-ntpc/install
|
define Package/luci-app-ntpc/install
|
||||||
|
@ -434,6 +434,17 @@ define Package/luci-app-ntpc/install
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
||||||
|
define Package/luci-app-ddns
|
||||||
|
$(call Package/luci/webtemplate)
|
||||||
|
DEPENDS+=+luci-mod-admin-core +ddns-scripts
|
||||||
|
TITLE:=Dynamic DNS configuration module
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/luci-app-ddns/install
|
||||||
|
$(call Package/luci/install/template,$(1),applications/luci-ddns)
|
||||||
|
endef
|
||||||
|
|
||||||
|
|
||||||
### Server Gateway Interfaces ###
|
### Server Gateway Interfaces ###
|
||||||
|
|
||||||
define Package/luci-sgi-cgi
|
define Package/luci-sgi-cgi
|
||||||
|
@ -594,6 +605,9 @@ endif
|
||||||
ifneq ($(CONFIG_PACKAGE_luci-app-ntpc),)
|
ifneq ($(CONFIG_PACKAGE_luci-app-ntpc),)
|
||||||
PKG_SELECTED_MODULES+=applications/luci-ntpc
|
PKG_SELECTED_MODULES+=applications/luci-ntpc
|
||||||
endif
|
endif
|
||||||
|
ifneq ($(CONFIG_PACKAGE_luci-app-ddns),)
|
||||||
|
PKG_SELECTED_MODULES+=applications/luci-ddns
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($(CONFIG_PACKAGE_luci-sgi-cgi),)
|
ifneq ($(CONFIG_PACKAGE_luci-sgi-cgi),)
|
||||||
PKG_SELECTED_MODULES+=libs/sgi-cgi
|
PKG_SELECTED_MODULES+=libs/sgi-cgi
|
||||||
|
@ -660,6 +674,7 @@ $(eval $(call BuildPackage,luci-app-splash))
|
||||||
$(eval $(call BuildPackage,luci-app-statistics))
|
$(eval $(call BuildPackage,luci-app-statistics))
|
||||||
$(eval $(call BuildPackage,luci-app-upnp))
|
$(eval $(call BuildPackage,luci-app-upnp))
|
||||||
$(eval $(call BuildPackage,luci-app-ntpc))
|
$(eval $(call BuildPackage,luci-app-ntpc))
|
||||||
|
$(eval $(call BuildPackage,luci-app-ddns))
|
||||||
|
|
||||||
$(eval $(call BuildPackage,luci-sgi-cgi))
|
$(eval $(call BuildPackage,luci-sgi-cgi))
|
||||||
$(eval $(call BuildPackage,luci-sgi-luci))
|
$(eval $(call BuildPackage,luci-sgi-luci))
|
||||||
|
|
Loading…
Reference in a new issue