luci-app-ddns: fix typo for has_curlssl()
authorleonghui <leonghui@users.noreply.github.com>
Sat, 5 Jan 2019 10:38:25 +0000 (10:38 +0000)
committerGitHub <noreply@github.com>
Sat, 5 Jan 2019 10:38:25 +0000 (10:38 +0000)
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 <wong.leonghui@gmail.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()