Update powerwall.sh

This commit is contained in:
2022-09-03 11:44:47 -05:00
parent bd6b4f8849
commit ef7a4ab177

View File

@@ -22,14 +22,9 @@ CHECKTEMP(){
temp_f=`echo "scale=2; $temp_c*1.8 + 32" | bc`
#echo "$temp_c -> $temp_f"
echo ${TEMP_THRESHOLDS[${1}]} | cut -d',' -f 1 | read temp_warn
echo ${TEMP_THRESHOLDS[${1}]} | cut -d',' -f 2 | read temp_crit
temp_warn=$((temp_warn + 0))
temp_crit=$((temp_crit + 0))
if [ $temp_f -ge ${temp_warn} ] && [ $temp_f -lt ${temp_crit} ]; then
if [ $temp_f -ge ${TEMP_WARN_THRESHOLDS[${1}]} ] && [ $temp_f -lt ${TEMP_CRIT_THRESHOLDS[${1}]} ]; then
echo "WARNING: $temp_f"
elif [ $temp_f -ge ${temp_crit} ]; then
elif [ $temp_f -ge ${TEMP_CRIT_THRESHOLDS[${1}]} ]; then
echo "CRITICAL: $temp_f"
else
echo "normal: $temp_f"