Update powerwall.sh
This commit is contained in:
@@ -21,15 +21,13 @@ CHECKTEMP(){
|
|||||||
if [ "$temp_c" != "null" ] && [ "$temp_c" != "" ]; then
|
if [ "$temp_c" != "null" ] && [ "$temp_c" != "" ]; then
|
||||||
temp_f=`echo "scale=2; $temp_c*1.8 + 32" | bc`
|
temp_f=`echo "scale=2; $temp_c*1.8 + 32" | bc`
|
||||||
#echo "$temp_c -> $temp_f"
|
#echo "$temp_c -> $temp_f"
|
||||||
|
|
||||||
temp_f=88
|
|
||||||
|
|
||||||
echo ${TEMP_THRESHOLDS[${1}]} | cut -d',' -f 1 | read temp_warn
|
echo ${TEMP_THRESHOLDS[${1}]} | cut -d',' -f 1 | read temp_warn
|
||||||
echo ${TEMP_THRESHOLDS[${1}]} | cut -d',' -f 2 | read temp_crit
|
echo ${TEMP_THRESHOLDS[${1}]} | cut -d',' -f 2 | read temp_crit
|
||||||
|
|
||||||
if [ $temp_f -ge ${temp_warn} ] && [ $temp_f -lt ${temp_crit} ]; then
|
if [ "$temp_f" -ge ${temp_warn} ] && [ "$temp_f" -lt ${temp_crit} ]; then
|
||||||
echo "WARNING: $temp_f"
|
echo "WARNING: $temp_f"
|
||||||
elif [ $temp_f -ge ${temp_crit} ]; then
|
elif [ "$temp_f" -ge ${temp_crit} ]; then
|
||||||
echo "CRITICAL: $temp_f"
|
echo "CRITICAL: $temp_f"
|
||||||
else
|
else
|
||||||
echo "normal: $temp_f"
|
echo "normal: $temp_f"
|
||||||
|
|||||||
Reference in New Issue
Block a user