1
0
Fork 0
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:
Ycarus (Yannick Chabanois) 2020-02-21 14:38:14 +01:00
parent 64ed54b14e
commit 9a7f33a0fa
2 changed files with 10 additions and 0 deletions

View 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

View file

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