update
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
VERS='2.6.75-04092024'
|
VERS='2.6.76-04092024'
|
||||||
|
|
||||||
noheader=' update service dailytemp confsync -r -report '
|
noheader=' update service dailytemp confsync -r -report '
|
||||||
|
|
||||||
|
|||||||
@@ -267,12 +267,13 @@ CHECKTEMP(){
|
|||||||
temp_crit=`echo "scale=1; ${temp_crit}/10" | bc`; temp_crit=`echo $(bc <<< "scale=2; ((${temp_crit}*(9/5))+32)/1") | awk '{print int($1+0.5)}'`
|
temp_crit=`echo "scale=1; ${temp_crit}/10" | bc`; temp_crit=`echo $(bc <<< "scale=2; ((${temp_crit}*(9/5))+32)/1") | awk '{print int($1+0.5)}'`
|
||||||
c=0; spc=''; spc1=`expr ${cw} - ${#sensorname} - 1`; until [ ${c} = ${spc1} ]; do spc="${spc} "; c=`expr ${c} + 1`; done
|
c=0; spc=''; spc1=`expr ${cw} - ${#sensorname} - 1`; until [ ${c} = ${spc1} ]; do spc="${spc} "; c=`expr ${c} + 1`; done
|
||||||
IFS=: read -r temp_f temp_h <<< $(CHECKTEMPSENSOR ${SENSOR}); unset IFS
|
IFS=: read -r temp_f temp_h <<< $(CHECKTEMPSENSOR ${SENSOR}); unset IFS
|
||||||
if [ $(bc -l <<< "${temp_f} >= ${temp_warn}") -eq 1 ] && [ $(bc -l <<< "${temp_f} < ${temp_crit}") -eq 1 ]; then
|
|
||||||
lclr="${idsCL[Yellow]}"
|
if [ $(bc -l <<< "${temp_f} >= ${temp_crit}") -eq 1 ] || ([ "${TTYPE}" == "fans" ] && [ $(bc -l <<< "${temp_f} > $(bc <<< "scale=2; ${GL_HIGH}+5")") -eq 1 ]); then
|
||||||
lmd="WARNING "
|
|
||||||
elif [ $(bc -l <<< "${temp_f} >= ${temp_crit}") -eq 1 ]; then
|
|
||||||
lclr="${idsCL[LightRed]}"
|
lclr="${idsCL[LightRed]}"
|
||||||
lmd="CRITICAL"
|
lmd="CRITICAL"
|
||||||
|
elif ([ $(bc -l <<< "${temp_f} >= ${temp_warn}") -eq 1 ] && [ $(bc -l <<< "${temp_f} < ${temp_crit}") -eq 1 ]) || ([ "${TTYPE}" == "fans" ] && ([ $(bc -l <<< "${temp_f} < ${GL_LOW}") -eq 1 ] || [ $(bc -l <<< "${GL_HIGH} < ${temp_f}") -eq 1 ])); then
|
||||||
|
lclr="${idsCL[Yellow]}"
|
||||||
|
lmd="WARNING "
|
||||||
else
|
else
|
||||||
lclr="${idsCL[Green]}"
|
lclr="${idsCL[Green]}"
|
||||||
lmd="Normal "
|
lmd="Normal "
|
||||||
@@ -290,7 +291,7 @@ CHECKTEMP(){
|
|||||||
averagedisp="${idsCL[Green]}"
|
averagedisp="${idsCL[Green]}"
|
||||||
elif [ $(bc -l <<< "${average} >= ${temp_crit}") -eq 1 ] || ([ "${TTYPE}" == "fans" ] && [ $(bc -l <<< "${average} > $(bc <<< "scale=2; ${GL_HIGH}+5")") -eq 1 ]); then
|
elif [ $(bc -l <<< "${average} >= ${temp_crit}") -eq 1 ] || ([ "${TTYPE}" == "fans" ] && [ $(bc -l <<< "${average} > $(bc <<< "scale=2; ${GL_HIGH}+5")") -eq 1 ]); then
|
||||||
averagedisp="${idsCL[LightRed]}${average_disp}"
|
averagedisp="${idsCL[LightRed]}${average_disp}"
|
||||||
elif ([ $(bc -l <<< "${average} >= ${temp_warn}") -eq 1 ] && [ $(bc -l <<< "${average} < ${temp_crit}") -eq 1 ]) || ([ "${TTYPE}" == "fans" ] && [ $(bc -l <<< "${average} < ${GL_LOW}") -eq 1 ]); then
|
elif ([ $(bc -l <<< "${average} >= ${temp_warn}") -eq 1 ] && [ $(bc -l <<< "${average} < ${temp_crit}") -eq 1 ]) || ([ "${TTYPE}" == "fans" ] && ([ $(bc -l <<< "${average} < ${GL_LOW}") -eq 1 ] || [ $(bc -l <<< "${GL_HIGH} < ${average}") -eq 1 ])); then
|
||||||
averagedisp="${idsCL[Yellow]}${average}"
|
averagedisp="${idsCL[Yellow]}${average}"
|
||||||
else
|
else
|
||||||
averagedisp="${idsCL[Green]}${average_disp}"
|
averagedisp="${idsCL[Green]}${average_disp}"
|
||||||
|
|||||||
Reference in New Issue
Block a user