mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
sync (#485)
This commit is contained in:
commit
3dbc6f254d
3 changed files with 5 additions and 3 deletions
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=modemmanager
|
PKG_NAME:=modemmanager
|
||||||
#PKG_SOURCE_VERSION:=1.23.6-dev
|
#PKG_SOURCE_VERSION:=1.23.6-dev
|
||||||
PKG_SOURCE_VERSION:=1e26e16168d4815a48ab77610e1c282dfc345567
|
PKG_SOURCE_VERSION:=c60e76bf713e2dce0fa610f4d94560febc1776db
|
||||||
PKG_RELEASE:=20
|
PKG_RELEASE:=20
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
|
|
|
@ -11,6 +11,7 @@ shift
|
||||||
# main loop
|
# main loop
|
||||||
while true; do
|
while true; do
|
||||||
OMR_QUOTA_REAL_INTERFACE="$(ifstatus $OMR_QUOTA_INTERFACE | jsonfilter -e '@.l3_device')"
|
OMR_QUOTA_REAL_INTERFACE="$(ifstatus $OMR_QUOTA_INTERFACE | jsonfilter -e '@.l3_device')"
|
||||||
|
[ -n "$(echo $OMR_QUOTA_INTERFACE | grep '@')" ] && OMR_QUOTA_REAL_INTERFACE=$(ifstatus "$1" | jsonfilter -q -e '@["device"]')
|
||||||
rx_bits=`vnstat -i $OMR_QUOTA_REAL_INTERFACE --json | jsonfilter -q -e '@.interfaces[0].traffic.month[-1].rx' | tr -d "\n"`
|
rx_bits=`vnstat -i $OMR_QUOTA_REAL_INTERFACE --json | jsonfilter -q -e '@.interfaces[0].traffic.month[-1].rx' | tr -d "\n"`
|
||||||
tx_bits=`vnstat -i $OMR_QUOTA_REAL_INTERFACE --json | jsonfilter -q -e '@.interfaces[0].traffic.month[-1].tx' | tr -d "\n"`
|
tx_bits=`vnstat -i $OMR_QUOTA_REAL_INTERFACE --json | jsonfilter -q -e '@.interfaces[0].traffic.month[-1].tx' | tr -d "\n"`
|
||||||
rx=$((rx_bits/1024))
|
rx=$((rx_bits/1024))
|
||||||
|
|
|
@ -18,8 +18,9 @@ _validate_section() {
|
||||||
_launch_quota() {
|
_launch_quota() {
|
||||||
local txquota rxquota ttquota interval enabled interface
|
local txquota rxquota ttquota interval enabled interface
|
||||||
_validate_section "interface" "$1"
|
_validate_section "interface" "$1"
|
||||||
interface=$(ifstatus "$1" | jsonfilter -q -e '@["l3_device"]')
|
interface=$1
|
||||||
[ -n "$(echo $interface | grep '@')" ] && interface=$(ifstatus "$1" | jsonfilter -q -e '@["device"]')
|
#interface=$(ifstatus "$1" | jsonfilter -q -e '@["l3_device"]')
|
||||||
|
#[ -n "$(echo $interface | grep '@')" ] && interface=$(ifstatus "$1" | jsonfilter -q -e '@["device"]')
|
||||||
|
|
||||||
[ -z "$interface" ] && return
|
[ -z "$interface" ] && return
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue