summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-ddns/luasrc/model/cbi/ddns/overview.lua
diff options
context:
space:
mode:
authorChristian Schöenebeck <christian.schoenebeck@gmail.com>2016-01-30 19:32:55 +0100
committerChristian Schöenebeck <christian.schoenebeck@gmail.com>2016-01-30 19:32:55 +0100
commit7f57a70110e8fefa9f744d10ebad2e499d0909bc (patch)
treea27eb290767025cdc85582a04c5e386c443660a1 /applications/luci-app-ddns/luasrc/model/cbi/ddns/overview.lua
parent2e92c0718ad2f0b9bafa829b93f47a434c479cfd (diff)
luci-app-ddns: bump to version 2.4.0-1
- fixes for #611 and #620 - adaptions for ddns-scripts 2.6.0 -- add hint for problems with BusyBox nslookup compiled with musl and offer installing hostip package -- add hint for not installed certificates inside /etc/ssl/certs and offer installing ca-certificates package https://github.com/openwrt/packages/pull/2243 -- check if malfunctional BusyBox nslookup installed, so disable using option dns_server if not Bind host or hostip installed - optimizations - cleanup: remove .po files without any translations Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
Diffstat (limited to 'applications/luci-app-ddns/luasrc/model/cbi/ddns/overview.lua')
-rw-r--r--applications/luci-app-ddns/luasrc/model/cbi/ddns/overview.lua40
1 files changed, 19 insertions, 21 deletions
diff --git a/applications/luci-app-ddns/luasrc/model/cbi/ddns/overview.lua b/applications/luci-app-ddns/luasrc/model/cbi/ddns/overview.lua
index 46fc0a4a29..e6da7cc188 100644
--- a/applications/luci-app-ddns/luasrc/model/cbi/ddns/overview.lua
+++ b/applications/luci-app-ddns/luasrc/model/cbi/ddns/overview.lua
@@ -1,4 +1,4 @@
--- Copyright 2014 Christian Schoenebeck <christian dot schoenebeck at gmail dot com>
+-- Copyright 2014-2016 Christian Schoenebeck <christian dot schoenebeck at gmail dot com>
-- Licensed to the public under the Apache License 2.0.
local NXFS = require "nixio.fs"
@@ -8,14 +8,17 @@ local SYS = require "luci.sys"
local CTRL = require "luci.controller.ddns" -- this application's controller
local DDNS = require "luci.tools.ddns" -- ddns multiused functions
--- show hints ?
-show_hints = not (DDNS.check_ipv6() -- IPv6 support
- and DDNS.check_ssl() -- HTTPS support
- and DDNS.check_proxy() -- Proxy support
- and DDNS.check_bind_host() -- DNS TCP support
+local show_hints = not (DDNS.has_ipv6 -- IPv6 support
+ and DDNS.has_ssl -- HTTPS support
+ and DDNS.has_proxy -- Proxy support
+ and DDNS.has_bindhost -- DNS TCP support
+ and DDNS.has_forceip -- Force IP version
+ and DDNS.has_dnsserver -- DNS server support
+ and DDNS.has_bindnet -- Bind to network/interface
+ and DDNS.has_cacerts -- certificates installed at /etc/ssl/certs
)
--- correct ddns-scripts version
-need_update = not CTRL.service_ok()
+local not_enabled = not SYS.init.enabled("ddns")
+local need_update = not CTRL.service_ok()
-- html constants
font_red = [[<font color="red">]]
@@ -45,13 +48,8 @@ a.template = "ddns/overview_status"
-- SimpleSection definition -- #################################################
-- show Hints to optimize installation and script usage
--- only show if service not enabled
--- or no IPv6 support
--- or not GNU Wget and not cURL (for https support)
--- or not GNU Wget but cURL without proxy support
--- or not BIND's host
--- or ddns-scripts package need update
-if show_hints or need_update or not SYS.init.enabled("ddns") then
+if show_hints or need_update or not_enabled then
+
s = m:section( SimpleSection, translate("Hints") )
-- ddns_scripts needs to be updated for full functionality
@@ -67,7 +65,7 @@ if show_hints or need_update or not SYS.init.enabled("ddns") then
end
-- DDNS Service disabled
- if not SYS.init.enabled("ddns") then
+ if not_enabled then
local dv = s:option(DummyValue, "_not_enabled")
dv.titleref = DISP.build_url("admin", "system", "startup")
dv.rawhtml = true
@@ -92,11 +90,11 @@ end
-- TableSection definition -- ##################################################
ts = m:section( TypedSection, "service",
translate("Overview"),
- translate("Below is a list of configured DDNS configurations and their current state.")
- .. "<br />"
- .. translate("If you want to send updates for IPv4 and IPv6 you need to define two separate Configurations "
- .. "i.e. 'myddns_ipv4' and 'myddns_ipv6'")
- .. "<br />"
+ translate("Below is a list of configured DDNS configurations and their current state.")
+ .. "<br />"
+ .. translate("If you want to send updates for IPv4 and IPv6 you need to define two separate Configurations "
+ .. "i.e. 'myddns_ipv4' and 'myddns_ipv6'")
+ .. "<br />"
.. [[<a href="]] .. DISP.build_url("admin", "services", "ddns", "global") .. [[">]]
.. translate("To change global settings click here") .. [[</a>]] )
ts.sectionhead = translate("Configuration")