hide kcptun option when no installed in SSR Plus

This commit is contained in:
coolsnowwolf 2018-10-09 20:14:41 +08:00
parent a3bc5bbcfa
commit 6fa017fa3d
2 changed files with 5 additions and 1 deletions

View File

@ -9,7 +9,7 @@ LUCI_TITLE:=LuCI support for SSR Plus
LUCI_DEPENDS:=+shadowsocksr-libev +ipset +ip-full +iptables-mod-tproxy +dnsmasq-full +coreutils +coreutils-base64 +bash +pdnsd-alt +wget
LUCI_PKGARCH:=all
PKG_VERSION:=1
PKG_RELEASE:=12
PKG_RELEASE:=13
include $(TOPDIR)/feeds/luci/luci.mk

View File

@ -68,11 +68,15 @@ function o.cfgvalue(...)
return Value.cfgvalue(...) or "?"
end
if nixio.fs.access("/usr/bin/ssr-kcptun") then
o = s:option(DummyValue, "kcp_enable", translate("KcpTun"))
function o.cfgvalue(...)
return Value.cfgvalue(...) or "?"
end
end
o = s:option(DummyValue, "switch_enable", translate("Auto Switch"))
function o.cfgvalue(...)
return Value.cfgvalue(...) or "0"