update
This commit is contained in:
18
powerwall.sh
18
powerwall.sh
@@ -101,8 +101,8 @@ CHECKTEMP(){
|
||||
}
|
||||
|
||||
CHECKTEMPSENSOR(){
|
||||
echo ${PW_TEMP_THRESHOLDS[${1}]} | cut -d',' -f 1 | read temp_warn
|
||||
echo ${PW_TEMP_THRESHOLDS[${1}]} | cut -d',' -f 2 | read temp_crit
|
||||
echo ${PW_THRESHOLDS[${1}]} | cut -d',' -f 1 | read temp_warn
|
||||
echo ${PW_THRESHOLDS[${1}]} | cut -d',' -f 2 | read temp_crit
|
||||
[ "${PW_SENSOR_TYPE[${1}]}" == "cpu" ] && GAUGESH="'%" || GAUGESH="'F"
|
||||
|
||||
if [ "${6}" != "noavg" ]; then
|
||||
@@ -261,10 +261,10 @@ CHECKTEMP_SERVICE(){
|
||||
fi
|
||||
if [ "${SENSORS_CHECK}" != "" ]; then
|
||||
for SENSOR in "${SENSORS_CHECK[@]}"; do
|
||||
if [ "${PW_TEMP_THRESHOLDS[${SENSORa}]}" != "" ]; then
|
||||
echo ${PW_TEMP_THRESHOLDS[${SENSORa}]} | cut -d',' -f 1 | read temp_warn
|
||||
echo ${PW_TEMP_THRESHOLDS[${SENSORa}]} | cut -d',' -f 2 | read temp_crit
|
||||
[ "$(echo ${PW_TEMP_THRESHOLDS[${SENSORa}]} | cut -d',' -f 3)" != "" ] && echo ${PW_TEMP_THRESHOLDS[${SENSORa}]} | cut -d',' -f 3 | read temp_crit_sys || temp_crit_sys=${temp_crit}
|
||||
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
|
||||
[ "$(echo ${PW_THRESHOLDS[${SENSORa}]} | cut -d',' -f 3)" != "" ] && echo ${PW_THRESHOLDS[${SENSORa}]} | cut -d',' -f 3 | read temp_crit_sys || temp_crit_sys=${temp_crit}
|
||||
fi
|
||||
|
||||
if [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "mqtt" ]; then
|
||||
@@ -323,9 +323,9 @@ CHECKTEMP_SERVICE(){
|
||||
# echo "HERE: ${SENSOR} - ${temp_c} - ${temp_f} - ${temp_warn} - ${temp_crit} - ${temp_crit_sys}"
|
||||
|
||||
if [ "${PW_SENSOR_TYPE[${SENSORa}]}" != "esxi" ]; then
|
||||
echo ${PW_TEMP_THRESHOLDS[${SENSOR}]} | cut -d',' -f 1 | read temp_warn
|
||||
echo ${PW_TEMP_THRESHOLDS[${SENSOR}]} | cut -d',' -f 2 | read temp_crit
|
||||
echo ${PW_TEMP_THRESHOLDS[${SENSOR}]} | cut -d',' -f 3 | read temp_crit_sys
|
||||
echo ${PW_THRESHOLDS[${SENSOR}]} | cut -d',' -f 1 | read temp_warn
|
||||
echo ${PW_THRESHOLDS[${SENSOR}]} | cut -d',' -f 2 | read temp_crit
|
||||
echo ${PW_THRESHOLDS[${SENSOR}]} | cut -d',' -f 3 | read temp_crit_sys
|
||||
fi
|
||||
|
||||
if [ "${last_temp[${SENSOR}]}" != "" ]; then
|
||||
|
||||
Reference in New Issue
Block a user