mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-12 10:31:51 +00:00
Detect SQM & QoS installation using apk in openmptcprouter interface
This commit is contained in:
parent
6185ad638a
commit
7000aa16b4
1 changed files with 6 additions and 0 deletions
|
@ -11,7 +11,13 @@
|
|||
local ifttyu = nixio.fs.glob("/dev/ttyUSB*")
|
||||
local ifttyc = nixio.fs.glob("/dev/cdc-wdm*")
|
||||
local sqm = luci.sys.exec("opkg list-installed | grep -q luci-app-sqm && echo -n '1' || echo -n '0'")
|
||||
if sqm == "0" then
|
||||
sqm = luci.sys.exec("apk list | grep installed | grep -q luci-app-sqm && echo -n '1' || echo -n '0'")
|
||||
end
|
||||
local qos = luci.sys.exec("opkg list-installed | grep -q luci-app-qos && echo -n '1' || echo -n '0'")
|
||||
if qos == "0" then
|
||||
qos = luci.sys.exec("apk list | grep installed | grep -q luci-app-qos && echo -n '1' || echo -n '0'")
|
||||
end
|
||||
menuentry = uci:get("openmptcprouter","settings","menu") or "openmptcprouter"
|
||||
function device_notvirtual(dev)
|
||||
if dev:match("^eth.*") or dev:match("^wwan.*") or dev:match("^tun.*") or dev:match("/") then
|
||||
|
|
Loading…
Reference in a new issue