luci-app-ddns: fix typo for has_curlssl() 4104/head
authorleonghui <leonghui@users.noreply.github.com>
Sat, 5 Jan 2019 10:38:25 +0000 (10:38 +0000)
committerChuck <fanck0605@qq.com>
Wed, 27 May 2020 08:45:18 +0000 (01:45 -0700)
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.

This cherry-picks commit 199d4b1d5c45111919ac5c1844ee5e37d14273a1

Signed-off-by: Leong Hui Wong <wong.leonghui@gmail.com>
Signed-off-by: Chuck <fanck0605@qq.com>
applications/luci-app-ddns/luasrc/tools/ddns.lua

index 6f0c7f0952e596f6cce8fb38a8a43c6190aa481b..07439acf2900e26ed0fac9201ea017f648696409 100755 (executable)
@@ -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()