mirror of
https://github.com/openwrt/routing.git
synced 2025-12-21 23:34:32 +04:00
[luci-app-bmx6] When drawing the network topology graph, try first wget-ssl
Signed-off-by: Pau Escrich <p4u@dabax.net>
This commit is contained in:
@@ -112,12 +112,16 @@ function wget(url, timeout)
|
|||||||
if pid == 0 then
|
if pid == 0 then
|
||||||
rfd:close()
|
rfd:close()
|
||||||
nixio.dup(wfd, nixio.stdout)
|
nixio.dup(wfd, nixio.stdout)
|
||||||
|
-- candidates for wget, try first ones with SSL support
|
||||||
local candidates = { "/usr/bin/wget", "/bin/wget" }
|
local candidates = {{"/usr/bin/wget-ssl",1},{"/usr/bin/wget",0},{"/bin/wget",0}}
|
||||||
local _, bin
|
local _, bin
|
||||||
for _, bin in ipairs(candidates) do
|
for _, bin in ipairs(candidates) do
|
||||||
if nixiofs.access(bin, "x") then
|
if nixiofs.access(bin[1], "x") then
|
||||||
nixio.exec(bin, "-q", "-O", "-", url)
|
if bin[2] == 0 then
|
||||||
|
nixio.exec(bin[1], "-q", "-O", "-", url)
|
||||||
|
else
|
||||||
|
nixio.exec(bin[1], "--no-check-certificate", "-q", "-O", "-", url)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user