mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-10-06 18:12:14 +02:00
display Traffic also when connected via WIFI
This commit is contained in:
@@ -58,8 +58,13 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# get network traffic
|
# get network traffic
|
||||||
network_rx=$(ifconfig eth0 | grep 'RX packets' | awk '{ print $6$7 }' | sed 's/[()]//g')
|
if ifconfig | grep -q "eth0"; then
|
||||||
network_tx=$(ifconfig eth0 | grep 'TX packets' | awk '{ print $6$7 }' | sed 's/[()]//g')
|
network_interface="eth0"
|
||||||
|
else
|
||||||
|
network_interface="wlan0"
|
||||||
|
fi
|
||||||
|
network_rx=$(ifconfig ${network_interface} | grep 'RX packets' | awk '{ print $6$7 }' | sed 's/[()]//g')
|
||||||
|
network_tx=$(ifconfig ${network_interface} | grep 'TX packets' | awk '{ print $6$7 }' | sed 's/[()]//g')
|
||||||
|
|
||||||
# Bitcoin blockchain
|
# Bitcoin blockchain
|
||||||
btc_path=$(command -v ${network}-cli)
|
btc_path=$(command -v ${network}-cli)
|
||||||
|
Reference in New Issue
Block a user