1
0
Fork 0
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:
Ycarus (Yannick Chabanois) 2025-01-27 19:30:11 +01:00
parent 6185ad638a
commit 7000aa16b4

View file

@ -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