luci-app-ddns: adapt to support khost (Knot DNS) and drill (ddns-scripts 2.7.1)

adapt to support khost (Knot DNS) and drill (ddns-scripts 2.7.1)

Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
This commit is contained in:
Christian Schoenebeck 2016-05-08 19:26:53 +02:00
parent 219e52ee8e
commit db8bb549aa
6 changed files with 77 additions and 72 deletions

View file

@ -10,7 +10,7 @@ PKG_NAME:=luci-app-ddns
# Version == major.minor.patch # Version == major.minor.patch
# increase on new functionality (minor) or patches (patch) # increase on new functionality (minor) or patches (patch)
PKG_VERSION:=2.4.3 PKG_VERSION:=2.4.4
# Release == build # Release == build
# increase on changes of translation files # increase on changes of translation files

View file

@ -18,11 +18,11 @@ local UTIL = require "luci.util"
local DDNS = require "luci.tools.ddns" -- ddns multiused functions local DDNS = require "luci.tools.ddns" -- ddns multiused functions
local srv_name = "ddns-scripts" local srv_name = "ddns-scripts"
local srv_ver_min = "2.6.3" -- minimum version of service required local srv_ver_min = "2.7.1" -- minimum version of service required
local srv_ver_cmd = [[/usr/lib/ddns/dynamic_dns_updater.sh --version | awk {'print $2'}]] local srv_ver_cmd = [[/usr/lib/ddns/dynamic_dns_updater.sh --version | awk {'print $2'}]]
local app_name = "luci-app-ddns" local app_name = "luci-app-ddns"
local app_title = "Dynamic DNS" local app_title = "Dynamic DNS"
local app_version = "2.4.2-1" local app_version = "2.4.4-1"
function index() function index()
local nxfs = require "nixio.fs" -- global definitions not available local nxfs = require "nixio.fs" -- global definitions not available

View file

@ -66,9 +66,9 @@ if not DDNS.has_ssl then
sl.rawhtml = true sl.rawhtml = true
sl.title = bold_on .. sl.title = bold_on ..
translate("HTTPS not supported") .. bold_off translate("HTTPS not supported") .. bold_off
sl.value = translate("Neither GNU Wget with SSL nor cURL installed to support updates via HTTPS protocol.") .. sl.value = translate("Neither GNU Wget with SSL nor cURL installed to support secure updates via HTTPS protocol.") ..
"<br />- " .. "<br />- " ..
translate("You should install GNU Wget with SSL (preferred) or cURL package.") .. translate("You should install 'wget' or 'curl' or 'uclient-fetch' with 'libustream-*ssl' package.") ..
"<br />- " .. "<br />- " ..
translate("In some versions cURL/libcurl in OpenWrt is compiled without proxy support.") translate("In some versions cURL/libcurl in OpenWrt is compiled without proxy support.")
end end
@ -82,7 +82,7 @@ if not DDNS.has_bindnet then
translate("Binding to a specific network not supported") .. bold_off translate("Binding to a specific network not supported") .. bold_off
bn.value = translate("Neither GNU Wget with SSL nor cURL installed to select a network to use for communication.") .. bn.value = translate("Neither GNU Wget with SSL nor cURL installed to select a network to use for communication.") ..
"<br />- " .. "<br />- " ..
translate("You should install GNU Wget with SSL or cURL package.") .. translate("You should install 'wget' or 'curl' package.") ..
"<br />- " .. "<br />- " ..
translate("GNU Wget will use the IP of given network, cURL will use the physical interface.") .. translate("GNU Wget will use the IP of given network, cURL will use the physical interface.") ..
"<br />- " .. "<br />- " ..
@ -98,7 +98,7 @@ if not DDNS.has_proxy then
translate("cURL without Proxy Support") .. bold_off translate("cURL without Proxy Support") .. bold_off
px.value = translate("cURL is installed, but libcurl was compiled without proxy support.") .. px.value = translate("cURL is installed, but libcurl was compiled without proxy support.") ..
"<br />- " .. "<br />- " ..
translate("You should install GNU Wget with SSL or replace libcurl.") .. translate("You should install 'wget' or 'uclient-fetch' package or replace libcurl.") ..
"<br />- " .. "<br />- " ..
translate("In some versions cURL/libcurl in OpenWrt is compiled without proxy support.") translate("In some versions cURL/libcurl in OpenWrt is compiled without proxy support.")
end end
@ -114,11 +114,11 @@ if not DDNS.has_forceip then
"the IP version to use for communication with DDNS Provider!") "the IP version to use for communication with DDNS Provider!")
if not (DDNS.has_wgetssl or DDNS.has_curl or DDNS.has_fetch) then if not (DDNS.has_wgetssl or DDNS.has_curl or DDNS.has_fetch) then
value = value .. "<br />- " .. value = value .. "<br />- " ..
translate("You should install GNU Wget with SSL (preferred) or cURL or uclient-fetch package.") translate("You should install 'wget' or 'curl' or 'uclient-fetch' package.")
end end
if not (DDNS.has_bindhost or DDNS.has_hostip) then if not (DDNS.has_bindhost or DDNS.has_hostip) then
value = value .. "<br />- " .. value = value .. "<br />- " ..
translate("You should install BIND host or hostip package for DNS requests.") translate("You should install 'bind-host' or 'knot-host' or 'drill' or 'hostip' package for DNS requests.")
end end
fi.value = value fi.value = value
end end
@ -133,7 +133,7 @@ if not DDNS.has_bindhost then
dt.value = translate("BusyBox's nslookup and hostip do not support to specify to use TCP " .. dt.value = translate("BusyBox's nslookup and hostip do not support to specify to use TCP " ..
"instead of default UDP when requesting DNS server!") .. "instead of default UDP when requesting DNS server!") ..
"<br />- " .. "<br />- " ..
translate("You should install BIND host package for DNS requests.") translate("You should install 'bind-host' or 'knot-host' or 'drill' package for DNS requests.")
end end
-- nslookup compiled with musl produce problems when using -- nslookup compiled with musl produce problems when using
@ -146,7 +146,7 @@ if not DDNS.has_dnsserver then
ds.value = translate("BusyBox's nslookup in the current compiled version " .. ds.value = translate("BusyBox's nslookup in the current compiled version " ..
"does not handle given DNS Servers correctly!") .. "does not handle given DNS Servers correctly!") ..
"<br />- " .. "<br />- " ..
translate("You should install BIND host or hostip package, " .. translate("You should install 'bind-host' or 'knot-host' or 'drill' or 'hostip' package, " ..
"if you need to specify a DNS server to detect your registered IP.") "if you need to specify a DNS server to detect your registered IP.")
end end
@ -159,7 +159,7 @@ if DDNS.has_ssl and not DDNS.has_cacerts then
translate("No certificates found") .. bold_off translate("No certificates found") .. bold_off
ca.value = translate("If using secure communication you should verify server certificates!") .. ca.value = translate("If using secure communication you should verify server certificates!") ..
"<br />- " .. "<br />- " ..
translate("Install ca-certificates package or needed certificates " .. translate("Install 'ca-certificates' package or needed certificates " ..
"by hand into /etc/ssl/certs default directory") "by hand into /etc/ssl/certs default directory")
end end

View file

@ -24,6 +24,8 @@ has_fetch = (SYS.call( [[which uclient-fetch >/dev/null 2>&1]] ) == 0)
has_fetchssl = NXFS.access("/lib/libustream-ssl.so") has_fetchssl = NXFS.access("/lib/libustream-ssl.so")
has_bbwget = (SYS.call( [[$(which wget) -V 2>&1 | grep -iqF "busybox"]] ) == 0) has_bbwget = (SYS.call( [[$(which wget) -V 2>&1 | grep -iqF "busybox"]] ) == 0)
has_bindhost = (SYS.call( [[which host >/dev/null 2>&1]] ) == 0) has_bindhost = (SYS.call( [[which host >/dev/null 2>&1]] ) == 0)
or (SYS.call( [[which khost >/dev/null 2>&1]] ) == 0)
or (SYS.call( [[which drill >/dev/null 2>&1]] ) == 0)
has_hostip = (SYS.call( [[which hostip >/dev/null 2>&1]] ) == 0) has_hostip = (SYS.call( [[which hostip >/dev/null 2>&1]] ) == 0)
has_nslookup = (SYS.call( [[$(which nslookup) localhost 2>&1 | grep -qF "(null)"]] ) ~= 0) has_nslookup = (SYS.call( [[$(which nslookup) localhost 2>&1 | grep -qF "(null)"]] ) ~= 0)
has_ipv6 = (NXFS.access("/proc/net/ipv6_route") and NXFS.access("/usr/sbin/ip6tables")) has_ipv6 = (NXFS.access("/proc/net/ipv6_route") and NXFS.access("/usr/sbin/ip6tables"))

View file

@ -1,15 +1,15 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: luci-app-ddns 2.4.2-1\n" "Project-Id-Version: luci-app-ddns 2.4.2-1\n"
"POT-Creation-Date: 2016-02-29 20:55+0100\n" "POT-Creation-Date: 2016-05-08 19:10+0200\n"
"PO-Revision-Date: 2016-03-29 19:35+0200\n" "PO-Revision-Date: 2016-05-08 19:12+0200\n"
"Last-Translator: Christian Schönebeck <christian.schoenebeck@gmail.com>\n" "Last-Translator: Christian Schönebeck <christian.schoenebeck@gmail.com>\n"
"Language-Team: \n" "Language-Team: \n"
"Language: de\n" "Language: de\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.8.4\n" "X-Generator: Poedit 1.8.7.1\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-SourceCharset: UTF-8\n" "X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-Basepath: .\n" "X-Poedit-Basepath: .\n"
@ -367,10 +367,10 @@ msgid "Info"
msgstr "Info" msgstr "Info"
msgid "" msgid ""
"Install ca-certificates package or needed certificates by hand into /etc/ssl/" "Install 'ca-certificates' package or needed certificates by hand into /etc/"
"certs default directory" "ssl/certs default directory"
msgstr "" msgstr ""
"Installieren Sie das ca-certificate Paket oder die benötigten Zertifikate " "Installieren Sie das 'ca-certificates' Paket oder die benötigten Zertifikate "
"von Hand in das Standardverzeichnis /etc/ssl/certs" "von Hand in das Standardverzeichnis /etc/ssl/certs"
msgid "Interface" msgid "Interface"
@ -432,14 +432,11 @@ msgstr ""
"Kommunikation festzulegen." "Kommunikation festzulegen."
msgid "" msgid ""
"Neither GNU Wget with SSL nor cURL installed to support updates via HTTPS " "Neither GNU Wget with SSL nor cURL installed to support secure updates via "
"protocol." "HTTPS protocol."
msgstr "" msgstr ""
"Weder GNU Wget mit SSL noch cURL sind installiert um Aktualisierungen über " "Weder GNU Wget mit SSL noch cURL sind installiert um sichere "
"HTTPS Protokoll zu unterstützen." "Aktualisierungen über HTTPS Protokoll zu unterstützen."
msgid "Network"
msgstr "Netzwerk"
msgid "Network on which the ddns-updater scripts will be started" msgid "Network on which the ddns-updater scripts will be started"
msgstr "Netzwerk auf dem Ereignisse die ddns-updater Skripte starten" msgstr "Netzwerk auf dem Ereignisse die ddns-updater Skripte starten"
@ -669,41 +666,48 @@ msgstr ""
"Schreibt Meldungen ins Systemprotokoll. Kritische Fehler werden immer in das " "Schreibt Meldungen ins Systemprotokoll. Kritische Fehler werden immer in das "
"Systemprotokoll geschrieben." "Systemprotokoll geschrieben."
msgid "You should install BIND host or hostip package for DNS requests." msgid ""
"You should install 'bind-host' or 'knot-host' or 'drill' or 'hostip' package "
"for DNS requests."
msgstr "" msgstr ""
"Sie sollten das Programmpakete BIND host oder hostip für DNS Anfragen " "Sie sollten das Programmpakete 'bind-host' oder 'knot-host' oder 'drill' "
"oder 'hostip' für DNS Anfragen installieren."
msgid ""
"You should install 'bind-host' or 'knot-host' or 'drill' or 'hostip' "
"package, if you need to specify a DNS server to detect your registered IP."
msgstr ""
"Sie sollten das Programmpakete 'bind-host' oder 'knot-host' oder 'drill' "
"oder 'hostip' installieren, wenn Sie einen DNS Server angeben müssen um Ihre "
"registrierte IP zu ermitteln."
msgid ""
"You should install 'bind-host' or 'knot-host' or 'drill' package for DNS "
"requests."
msgstr ""
"Sie sollten das Programmpakete 'bind-host' oder 'knot-host' oder 'drill' für "
"DNS Anfragen installieren."
msgid "You should install 'wget' or 'curl' or 'uclient-fetch' package."
msgstr ""
"Sie sollten das Programmpaket 'wget' oder 'curl' oder 'uclient-fetch' "
"installieren." "installieren."
msgid "" msgid ""
"You should install BIND host or hostip package, if you need to specify a DNS " "You should install 'wget' or 'curl' or 'uclient-fetch' with 'libustream-"
"server to detect your registered IP." "*ssl' package."
msgstr "" msgstr ""
"Sie sollten das BIND host oder hostIP Paket installieren, wenn Sie einen DNS-" "Sie sollten das Programmpaket 'wget' oder 'curl' oder 'uclient-fetch' mit "
"Server angeben müssen um Ihre registrierte IP zu ermitteln." "'libustream-*ssl' installieren."
msgid "You should install BIND host package for DNS requests." msgid "You should install 'wget' or 'curl' package."
msgstr "" msgstr "Sie sollten das Programmpaket 'wget' oder 'curl' installieren."
"Sie sollten das Programmpakete BIND host for DNS Anfragen installieren."
msgid "" msgid ""
"You should install GNU Wget with SSL (preferred) or cURL or uclient-fetch " "You should install 'wget' or 'uclient-fetch' package or replace libcurl."
"package."
msgstr "" msgstr ""
"Sie sollten das Programmpaket GNU Wget mit SSL (bevorzugt) oder cURL oder " "Sie sollten das Programmpaket 'wget' oder 'uclient-fetch' installieren oder "
"uclient-fetch installieren." "libcurl ersetzen."
msgid "You should install GNU Wget with SSL (preferred) or cURL package."
msgstr ""
"Sie sollten das Programmpaket GNU Wget mit SSL (bevorzugt) oder cURL "
"installieren."
msgid "You should install GNU Wget with SSL or cURL package."
msgstr "Sie sollten das Programmpaket GNU Wget mit SSL oder cURL installieren."
msgid "You should install GNU Wget with SSL or replace libcurl."
msgstr ""
"Sie sollten das Programmpaket GNU Wget mit SSL installieren oder libcurl "
"austauschen."
msgid "cURL is installed, but libcurl was compiled without proxy support." msgid "cURL is installed, but libcurl was compiled without proxy support."
msgstr "" msgstr ""

View file

@ -298,11 +298,8 @@ msgid "Info"
msgstr "" msgstr ""
msgid "" msgid ""
"Install ca-certificates package or needed certificates by hand into /etc/ssl/" "Install 'ca-certificates' package or needed certificates by hand into /etc/"
"certs default directory" "ssl/certs default directory"
msgstr ""
msgid "Interface"
msgstr "" msgstr ""
msgid "" msgid ""
@ -352,11 +349,8 @@ msgid ""
msgstr "" msgstr ""
msgid "" msgid ""
"Neither GNU Wget with SSL nor cURL installed to support updates via HTTPS " "Neither GNU Wget with SSL nor cURL installed to support secure updates via "
"protocol." "HTTPS protocol."
msgstr ""
msgid "Network"
msgstr "" msgstr ""
msgid "Network on which the ddns-updater scripts will be started" msgid "Network on which the ddns-updater scripts will be started"
@ -570,29 +564,34 @@ msgid ""
"syslog." "syslog."
msgstr "" msgstr ""
msgid "You should install BIND host or hostip package for DNS requests." msgid ""
"You should install 'bind-host' or 'knot-host' or 'drill' or 'hostip' package "
"for DNS requests."
msgstr "" msgstr ""
msgid "" msgid ""
"You should install BIND host or hostip package, if you need to specify a DNS " "You should install 'bind-host' or 'knot-host' or 'drill' or 'hostip' "
"server to detect your registered IP." "package, if you need to specify a DNS server to detect your registered IP."
msgstr ""
msgid "You should install BIND host package for DNS requests."
msgstr "" msgstr ""
msgid "" msgid ""
"You should install GNU Wget with SSL (preferred) or cURL or uclient-fetch " "You should install 'bind-host' or 'knot-host' or 'drill' package for DNS "
"package." "requests."
msgstr "" msgstr ""
msgid "You should install GNU Wget with SSL (preferred) or cURL package." msgid "You should install 'wget' or 'curl' or 'uclient-fetch' package."
msgstr "" msgstr ""
msgid "You should install GNU Wget with SSL or cURL package." msgid ""
"You should install 'wget' or 'curl' or 'uclient-fetch' with 'libustream-"
"*ssl' package."
msgstr "" msgstr ""
msgid "You should install GNU Wget with SSL or replace libcurl." msgid "You should install 'wget' or 'curl' package."
msgstr ""
msgid ""
"You should install 'wget' or 'uclient-fetch' package or replace libcurl."
msgstr "" msgstr ""
msgid "cURL is installed, but libcurl was compiled without proxy support." msgid "cURL is installed, but libcurl was compiled without proxy support."