Report IP for more cases fix.

This commit is contained in:
Igor Pecovnik 2016-01-28 16:58:10 +01:00
parent ecfa881947
commit ddb0be66a8

View File

@ -87,7 +87,7 @@ users=$(users | wc -w)
swap_total=$(free -m | awk '/Swap/ { printf("%3.0f", $3/$2*100) }' | sed 's/ //g')
swap_usage=${swap_usage//[!0-9]/} # to remove alfanumeric if swap not used
swap_total=$(free -m | awk '/Swap/ {print $(2)}')
ip_address=$((ifconfig br0 && ifconfig eth0 && ifconfig wlan0) | sed -n '/inet addr/s/.*addr.\([^ ]*\) .*/\1/p')
ip_address=$((ifconfig br0 || ifconfig eth0 || ifconfig wlan0) | sed -n '/inet addr/s/.*addr.\([^ ]*\) .*/\1/p')
root_usage=$(df -h / | awk '/\// {print $(NF-1)}' | sed 's/%//g')
root_total=$(df -h / | awk '/\// {print $(NF-4)}')
if [ -e "$storage" ]; then