Update powerwall.sh
This commit is contained in:
@@ -246,6 +246,7 @@ CHECKTEMP_SERVICE(){
|
||||
if [ "${SENSORS_CHECK}" != "" ]; then
|
||||
for SENSOR in "${SENSORS_CHECK[@]}"; do
|
||||
[ "${last_temp[${SENSOR//-/}]}" == "" ] && last_temp[${SENSOR//-/}]=0
|
||||
echo "${SENSOR//-/} - ${last_temp[${SENSOR//-/}]}"
|
||||
if [ "${PW_THRESHOLDS[${SENSORa}]}" != "" ]; then
|
||||
echo ${PW_THRESHOLDS[${SENSORa}]} | cut -d',' -f 1 | read temp_warn
|
||||
echo ${PW_THRESHOLDS[${SENSORa}]} | cut -d',' -f 2 | read temp_crit
|
||||
@@ -291,7 +292,7 @@ CHECKTEMP_SERVICE(){
|
||||
temp_h=''
|
||||
|
||||
fi
|
||||
|
||||
echo "${SENSOR//-/} - ${last_temp[${SENSOR//-/}]}"
|
||||
logtemp=${PW_LOGFOLDER}/log-temp-${SENSOR}
|
||||
if [ "${temp_c}" != "null" ] && [ "${temp_c}" != "" ]; then
|
||||
[ "${PW_SENSOR_TYPE[${SENSORa}]}" == "cpu" ] && GAUGE="CPU-USAGE" || GAUGE="TEMP"
|
||||
@@ -302,6 +303,7 @@ CHECKTEMP_SERVICE(){
|
||||
rm -f ${PW_TMPFOLDER}/${SENSOR}-error.reading
|
||||
|
||||
fi
|
||||
echo "${SENSOR//-/} - ${last_temp[${SENSOR//-/}]}"
|
||||
|
||||
[ "${PW_SENSOR_TYPE[${SENSOR}]}" == "cpu" ] && temp_f=$(echo "scale=2; $temp_c/1" | bc -l) || temp_f=$(echo "scale=2; ${temp_c}*1.8 + 32" | bc)
|
||||
[ "${SENSOR}" == "ServerRoomTH" ] && temp_f=`echo "scale=2; ${temp_f}+${PW_ServerRoomTH_Dev}" | bc`
|
||||
|
||||
Reference in New Issue
Block a user