luci-app-speederv2: fix bin check

Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
This commit is contained in:
hue715 2021-01-21 23:52:56 +08:00 committed by GitHub
parent 0082096a42
commit 7296cac497
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,7 +6,7 @@ local function has_bin(name)
return luci.sys.call("command -v %s >/dev/null" %{name}) == 0 return luci.sys.call("command -v %s >/dev/null" %{name}) == 0
end end
if has_bin("speederv2") then if has_bin("udpspeeder") then
uci:foreach("speederv2", "servers", function(s) uci:foreach("speederv2", "servers", function(s)
if s.server_port and s.listen_port then if s.server_port and s.listen_port then
servers[#servers+1] = {name = s[".name"], alias = s.alias or "%s:%s" %{s.server_port, s.listen_port}} servers[#servers+1] = {name = s[".name"], alias = s.alias or "%s:%s" %{s.server_port, s.listen_port}}