mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-02-24 14:51:03 +01:00
fix for BTRFS
This commit is contained in:
parent
7c36c1a0a9
commit
bf2240accd
1 changed files with 4 additions and 11 deletions
|
@ -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')
|
||||
|
|
Loading…
Add table
Reference in a new issue