diff options
author | Manuel Palenzuela <manuelpalenzuelamerino@gmail.com> | 2019-10-25 14:07:33 +0100 |
---|---|---|
committer | Manuel Palenzuela <manuelpalenzuelamerino@gmail.com> | 2019-10-25 14:07:33 +0100 |
commit | 4be623eec5b48079486341609dd5fa9cbd58ea52 (patch) | |
tree | 62cf30e210b6fbc2c272a692d5bc658d05c7dc26 | |
parent | 86743660c77f0b413e7cb26ed9f236f90504f504 (diff) |
Fixed networkup/down but new bug now
-rw-r--r-- | TODO.org | 3 | ||||
-rwxr-xr-x | modules/networkdowntraffic | 2 | ||||
-rwxr-xr-x | modules/networkuptraffic | 2 |
3 files changed, 3 insertions, 4 deletions
@@ -12,10 +12,9 @@ Each module writes to stdout. * Todo List - Delay in archupdates module (if minutes divisible by 5/4) - Add dependencies like bc -- Add hostname module Bugs to fix: -None +- Fix networkup/down crazy values Modules to Write: - We are more than welcome to accept ideas and pull requests for future diff --git a/modules/networkdowntraffic b/modules/networkdowntraffic index f1b5584..d272503 100755 --- a/modules/networkdowntraffic +++ b/modules/networkdowntraffic @@ -21,7 +21,7 @@ get_down_traffic() IFACES=$(ip -o link show | awk -F': ' '{print $2}') for IFACE in $IFACES; do if [ $IFACE != "lo" ]; then - RECIEVE2=$(($(ip -s -c link show wlan0 | tail -n3 | head -n 1 | cut -d " " -f5) + $RECIEVE2)) + RECIEVE2=$(($(ip -s -c link show $IFACE | tail -n3 | head -n 1 | cut -d " " -f5) + $RECIEVE2)) fi done diff --git a/modules/networkuptraffic b/modules/networkuptraffic index 6b002e6..b1db633 100755 --- a/modules/networkuptraffic +++ b/modules/networkuptraffic @@ -21,7 +21,7 @@ get_up_traffic() IFACES=$(ip -o link show | awk -F': ' '{print $2}') for IFACE in $IFACES; do if [ $IFACE != "lo" ]; then - TRANSMIT2=$(($(ip -s -c link show wlan0 | tail -n1 | cut -d " " -f5) + TRANSMIT2)) + TRANSMIT2=$(($(ip -s -c link show $IFACE | tail -n1 | cut -d " " -f5) + TRANSMIT2)) fi done |