From 3562a69c232437d77f316145a95e2844882f9c74 Mon Sep 17 00:00:00 2001 From: Manuel Palenzuela Date: Sat, 26 Oct 2019 02:26:33 +0100 Subject: Fixed networkup/down bug (crazy num) --- modules/networkdowntraffic | 2 +- modules/networkuptraffic | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/networkdowntraffic b/modules/networkdowntraffic index d272503..e8d3a74 100755 --- a/modules/networkdowntraffic +++ b/modules/networkdowntraffic @@ -12,7 +12,7 @@ get_down_traffic() IFACES=$(ip -o link show | awk -F': ' '{print $2}') for IFACE in $IFACES; do if [ $IFACE != "lo" ]; then - RECIEVE1=$(($(ip -s -c link show wlan0 | tail -n3 | head -n 1 | cut -d " " -f5) + $RECIEVE1)) + RECIEVE1=$(($(ip -s -c link show $IFACE | tail -n3 | head -n 1 | cut -d " " -f5) + $RECIEVE1)) fi done diff --git a/modules/networkuptraffic b/modules/networkuptraffic index b1db633..396e969 100755 --- a/modules/networkuptraffic +++ b/modules/networkuptraffic @@ -12,7 +12,7 @@ get_up_traffic() IFACES=$(ip -o link show | awk -F': ' '{print $2}') for IFACE in $IFACES; do if [ $IFACE != "lo" ]; then - TRANSMIT1=$(($(ip -s -c link show wlan0 | tail -n1 | cut -d " " -f5) + TRANSMIT1)) + TRANSMIT1=$(($(ip -s -c link show $IFACE | tail -n1 | cut -d " " -f5) + TRANSMIT1)) fi done -- cgit v1.2.3