fix for BTRFS

This commit is contained in:
rootzoll 2019-12-16 13:27:10 +01:00
parent 7c36c1a0a9
commit bf2240accd

View file

@ -15,6 +15,10 @@ color_purple='\033[0;35m'
source /home/admin/raspiblitz.info 2>/dev/null
source /mnt/hdd/raspiblitz.conf 2>/dev/null
## get HDD/SSD info
source <(/home/admin/config.scripts/blitz.datadrive.sh status)
hdd="${hddUsedInfo}"
# get UPS info
source <(/home/admin/config.scripts/blitz.ups.sh status)
upsInfo=""
@ -80,17 +84,6 @@ else
color_ram=${color_green}
fi
# HDD usage
hdd_used_space=$(df -h | grep "/dev/sda" | sed -e's/ */ /g' | cut -d" " -f 3 2>/dev/null)
hdd_used_ratio=$(df -h | grep "/dev/sda" | sed -e's/ */ /g' | cut -d" " -f 5 | tr -dc '0-9' 2>/dev/null)
hdd="${hdd_used_space} (${hdd_used_ratio}%)"
if [ ${hdd_used_ratio} -gt 90 ]; then
color_hdd="${color_red}\e[7m"
else
color_hdd=${color_green}
fi
# get network traffic
# ifconfig does not show eth0 on Armbian or in a VM - get first traffic info
isArmbian=$(cat /etc/os-release 2>/dev/null | grep -c 'Debian')