From 199d4b1d5c45111919ac5c1844ee5e37d14273a1 Mon Sep 17 00:00:00 2001 From: leonghui Date: Sat, 5 Jan 2019 10:38:25 +0000 Subject: luci-app-ddns: fix typo for has_curlssl() Fixes the incorrect message "HTTPS not supported please disable !" when curl with https support is present. grep returns exit code 0 when a match is found. Signed-off-by: Leong Hui Wong --- applications/luci-app-ddns/luasrc/tools/ddns.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'applications/luci-app-ddns/luasrc') diff --git a/applications/luci-app-ddns/luasrc/tools/ddns.lua b/applications/luci-app-ddns/luasrc/tools/ddns.lua index 6f0c7f0952..07439acf29 100755 --- a/applications/luci-app-ddns/luasrc/tools/ddns.lua +++ b/applications/luci-app-ddns/luasrc/tools/ddns.lua @@ -21,7 +21,7 @@ function env_info(type) end local function has_curlssl() - return (SYS.call( [[$(which curl) -V 2>&1 | grep "Protocols:" | grep -qF "https"]] ) ~= 0) + return (SYS.call( [[$(which curl) -V 2>&1 | grep "Protocols:" | grep -qF "https"]] ) == 0) end local function has_fetch() -- cgit v1.2.3 From 1d93eb808be1a2c42a3bd4224f670dfc1aa19eca Mon Sep 17 00:00:00 2001 From: leonghui Date: Sat, 5 Jan 2019 18:49:37 +0000 Subject: luci-app-ddns: remove first grep Signed-off-by: Leong Hui Wong --- applications/luci-app-ddns/luasrc/tools/ddns.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'applications/luci-app-ddns/luasrc') diff --git a/applications/luci-app-ddns/luasrc/tools/ddns.lua b/applications/luci-app-ddns/luasrc/tools/ddns.lua index 07439acf29..fb8d0d207e 100755 --- a/applications/luci-app-ddns/luasrc/tools/ddns.lua +++ b/applications/luci-app-ddns/luasrc/tools/ddns.lua @@ -21,7 +21,7 @@ function env_info(type) end local function has_curlssl() - return (SYS.call( [[$(which curl) -V 2>&1 | grep "Protocols:" | grep -qF "https"]] ) == 0) + return (SYS.call( [[$(which curl) -V 2>&1 | grep -qF "https"]] ) == 0) end local function has_fetch() -- cgit v1.2.3