aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO.org3
-rwxr-xr-xmodules/networkdowntraffic2
-rwxr-xr-xmodules/networkuptraffic2
3 files changed, 3 insertions, 4 deletions
diff --git a/TODO.org b/TODO.org
index 825a3bf..32e5212 100644
--- a/TODO.org
+++ b/TODO.org
@@ -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