1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Merge branch 'test' into develop

This commit is contained in:
suyuan 2021-02-17 23:10:51 +08:00
commit cf19516cb4
7 changed files with 74 additions and 64 deletions

View file

@ -24,6 +24,6 @@ elif [ "$TYPE" = "lte" ]; then
fi
[ -z "$INFO" ] && echo $PERCENT && return
OPERATOR=$(timeout 1 uqmi -d $MODEM_INTF --get-serving-system | jsonfilter -e '@.plmn_description' | tr -d '\n')
NUMBER=$(timeout 1 uqmi -d $MODEM_INTF --msisdn | jsonfilter -e '@' | tr -d '\n')
NUMBER=$(timeout 1 uqmi -d $MODEM_INTF --get-msisdn | jsonfilter -e '@' | tr -d '\n')
STATE=$(timeout 1 uqmi -d $MODEM_INTF --get-data-status | jsonfilter -e '@' | tr -d '\n')
[ "$INFO" = "all" ] && echo "$PERCENT;$OPERATOR;$NUMBER;$TATE;$TYPE"

View file

@ -1373,20 +1373,20 @@ function interfaces_status()
if connectivity ~= "ERROR" then
if ifname ~= nil and ifname:match("^tun.*") and interface:match("^ovpn.*") then
publicIP = uci:get("openmptcprouter",interface:sub(5),"publicip") or ""
if ifname ~= nil and publicIP == "" and mArray.openmptcprouter["external_check"] ~= false and mArray.openmptcprouter["dns"] == true then
if ifname ~= nil and ipaddr ~= "" and publicIP == "" and mArray.openmptcprouter["external_check"] ~= false and mArray.openmptcprouter["dns"] == true then
publicIP = ut.trim(sys.exec("omr-ip-intf " .. get_device(interface:sub(5))))
end
publicIP6 = uci:get("openmptcprouter",interface:sub(5),"publicip6") or ""
if ifname ~= nil and publicIP6 == "" and mArray.openmptcprouter["external_check"] ~= false and mArray.openmptcprouter["dns"] == true then
if ifname ~= nil and ip6addr ~= "" and publicIP6 == "" and mArray.openmptcprouter["external_check"] ~= false and mArray.openmptcprouter["dns"] == true then
publicIP6 = ut.trim(sys.exec("omr-ip6-intf " .. get_device(interface:sub(5))))
end
else
publicIP = uci:get("openmptcprouter",interface,"publicip") or ""
if ifname ~= nil and publicIP == "" and mArray.openmptcprouter["external_check"] ~= false and mArray.openmptcprouter["dns"] == true then
if ifname ~= nil and ipaddr ~= "" and publicIP == "" and mArray.openmptcprouter["external_check"] ~= false and mArray.openmptcprouter["dns"] == true then
publicIP = ut.trim(sys.exec("omr-ip-intf " .. ifname))
end
publicIP6 = uci:get("openmptcprouter",interface,"publicip6") or ""
if ifname ~= nil and publicIP6 == "" and mArray.openmptcprouter["external_check"] ~= false and mArray.openmptcprouter["dns"] == true then
if ifname ~= nil and ip6addr ~= "" and publicIP6 == "" and mArray.openmptcprouter["external_check"] ~= false and mArray.openmptcprouter["dns"] == true then
publicIP6 = ut.trim(sys.exec("omr-ip6-intf " .. ifname))
end
end