From 664e69df32f868fc11f8d99b1cbbdaaa8819025c Mon Sep 17 00:00:00 2001 From: olli Date: Mon, 26 Jun 2023 16:09:31 +0200 Subject: [PATCH] temperature check fix --- runchecks.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/runchecks.yml b/runchecks.yml index da6f32c..f194fac 100644 --- a/runchecks.yml +++ b/runchecks.yml @@ -113,11 +113,11 @@ then g_echo_error "SMART of $disk unhealthy: smartctl -H $OPT $disk $(cat ${g_tmp}/smartctl)" fi + # temperature check + temperature=$(smartctl -x $OPT $disk | perl -pe 's/ +/ /g; s/^ //' | egrep "^194 Temperature_Celsius " | cut -d" " -f 8) + [ -z "$temperature" ] && continue + [ $temperature -gt 65 ] && g_echo_error "SMART temperature of disk $disk high ($temperature Celsius)" fi - # temperature check - temperature=$(smartctl -x $OPT $disk | egrep "^Current Temperature" | perl -pe 's/ +/ /g' | cut -d" " -f3) - [ -z "$temperature" ] && continue - [ $temperature -gt 65 ] && g_echo_error "SMART temperature of disk $disk high ($temperature Celsius)" done validate: /bin/bash -n %s backup: yes