Fixed networkup/down but new bug now

This commit is contained in:
Manuel Palenzuela 2019-10-25 14:07:33 +01:00
parent 86743660c7
commit 4be623eec5
3 changed files with 3 additions and 4 deletions

View file

@ -12,10 +12,9 @@ Each module writes to stdout.
* Todo List * Todo List
- Delay in archupdates module (if minutes divisible by 5/4) - Delay in archupdates module (if minutes divisible by 5/4)
- Add dependencies like bc - Add dependencies like bc
- Add hostname module
Bugs to fix: Bugs to fix:
None - Fix networkup/down crazy values
Modules to Write: Modules to Write:
- We are more than welcome to accept ideas and pull requests for future - We are more than welcome to accept ideas and pull requests for future

View file

@ -21,7 +21,7 @@ get_down_traffic()
IFACES=$(ip -o link show | awk -F': ' '{print $2}') IFACES=$(ip -o link show | awk -F': ' '{print $2}')
for IFACE in $IFACES; do for IFACE in $IFACES; do
if [ $IFACE != "lo" ]; then 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 fi
done done

View file

@ -21,7 +21,7 @@ get_up_traffic()
IFACES=$(ip -o link show | awk -F': ' '{print $2}') IFACES=$(ip -o link show | awk -F': ' '{print $2}')
for IFACE in $IFACES; do for IFACE in $IFACES; do
if [ $IFACE != "lo" ]; then 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 fi
done done