mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-12 18:41:51 +00:00
Add signal with modemmanager proto WIP
This commit is contained in:
parent
64ed54b14e
commit
9a7f33a0fa
2 changed files with 10 additions and 0 deletions
7
luci-app-openmptcprouter/root/bin/omr-modemmanager
Executable file
7
luci-app-openmptcprouter/root/bin/omr-modemmanager
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
MODEM_INTF=$1
|
||||
[ -z "$MODEM_INTF" ] && return
|
||||
SIGNAL_INFO=$(mmcli -m $MODEM_INTF --output-keyvalue)
|
||||
[ -z "$SIGNAL_INFO" ] && return
|
||||
PERCENT=$(echo $SIGNAL_INFO | grep 'status.signal-quality' | awk -F": " '{print $2}')
|
||||
echo $PERCENT
|
|
@ -1027,6 +1027,9 @@ function interfaces_status()
|
|||
elseif proto == "3g" then
|
||||
local device = section['device']
|
||||
signal = sys.exec("omr-3g " .. device)
|
||||
elseif proto == "modemmanager" then
|
||||
local device = section['device']
|
||||
signal = sys.exec("omr-modemmanager " .. device)
|
||||
end
|
||||
|
||||
local latency = ""
|
||||
|
|
Loading…
Reference in a new issue