updated 30-hdd-temp, now worcking from smartctl

This commit is contained in:
2019-08-16 13:06:08 +03:00
parent db0e746111
commit d07354218e
5 changed files with 7 additions and 7 deletions

View File

@@ -1,11 +1,11 @@
#!/bin/bash
sd=(sda sdb sdc sdd sde)
sd=(sda sdb sdc sdd sde sdf)
out=""
clear="\e[0m\e[39m"
my_target_temp=45
for i in ${!sd[@]}; do
temp=$(hddtemp -nq /dev/${sd[$i]} 2> /dev/null)
temp=$(smartctl -a /dev/${sd[$i]} | grep Temperature_Celsius | awk '{print $10}' 2> /dev/null)
color="\e[42m"
if [ "$temp" -ge "${my_target_temp}" ]; then
color="\e[41m"