Update temp.inc.sh
This commit is contained in:
@@ -967,21 +967,13 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
|
|||||||
|
|
||||||
elif [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "system" ]; then
|
elif [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "system" ]; then
|
||||||
if [[ "${SENSOR}" = *"CPU"* ]]; then
|
if [[ "${SENSOR}" = *"CPU"* ]]; then
|
||||||
temp_c=$(vcgencmd measure_temp)
|
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#*=}
|
temp_c=${temp_c%\'*}; temp_c=${temp_c#*=}
|
||||||
temp_h=''
|
fi
|
||||||
elif [[ "${SENSOR}" = *"FAN"* ]]; then
|
elif [[ "${SENSOR}" = *"FAN"* ]]; then
|
||||||
temp_c=$(cat ${PW_FANINPUT})
|
if ! temp_c=$(ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${PW_REMOTE_SENSORS[${SENSOR}]} cat ${PW_FANINPUT}) ; then TIMEOUT=1; fi
|
||||||
temp_h=''
|
|
||||||
if [ "${SENSOR}" == "Powerwall-FAN" ] && [ ${temp_c} -lt 1500 ]; then
|
|
||||||
START_POWERWALL_FAN >/dev/null 2>&1 &
|
|
||||||
fi
|
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
|
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=$(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')
|
||||||
|
|||||||
Reference in New Issue
Block a user