Update temp.inc.sh
This commit is contained in:
@@ -967,22 +967,14 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
|
||||
|
||||
elif [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "system" ]; then
|
||||
if [[ "${SENSOR}" = *"CPU"* ]]; then
|
||||
temp_c=$(vcgencmd measure_temp)
|
||||
temp_c=${temp_c%\'*}; temp_c=${temp_c#*=}
|
||||
temp_h=''
|
||||
elif [[ "${SENSOR}" = *"FAN"* ]]; then
|
||||
temp_c=$(cat ${PW_FANINPUT})
|
||||
temp_h=''
|
||||
if [ "${SENSOR}" == "Powerwall-FAN" ] && [ ${temp_c} -lt 1500 ]; then
|
||||
START_POWERWALL_FAN >/dev/null 2>&1 &
|
||||
if ! temp_c=$(ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${PW_REMOTE_SENSORS[${SENSOR}]} vcgencmd measure_temp) ; then TIMEOUT=1; fi
|
||||
if [ "${temp_c}" != "" ]; then
|
||||
temp_c=${temp_c%\'*}; temp_c=${temp_c#*=}
|
||||
fi
|
||||
elif [[ "${SENSOR}" = *"FAN"* ]]; then
|
||||
if ! temp_c=$(ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${PW_REMOTE_SENSORS[${SENSOR}]} cat ${PW_FANINPUT}) ; then TIMEOUT=1; fi
|
||||
fi
|
||||
|
||||
elif [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "remotesystem" ]; then
|
||||
temp_c=$(ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${PW_REMOTE_SENSORS[${SENSOR}]} vcgencmd measure_temp)
|
||||
temp_c=${temp_c%\'*}; temp_c=${temp_c#*=}
|
||||
temp_h=''
|
||||
|
||||
|
||||
elif [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "esxi" ]; then
|
||||
temp_c=$(snmpwalk -v 1 -c public -t 2 ${PW_HOST_IDRACS[${SENSORa}]} .1.3.6.1.4.1.674.10892.5.4.700.20.1.6.1.${t} -O vq | sed -e 's/"//g')
|
||||
temp_c=`echo "scale=1; ${temp_c}/10" | bc`
|
||||
|
||||
Reference in New Issue
Block a user