update
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
VERS='2.6.75-04092024'
|
||||
VERS='2.6.76-04092024'
|
||||
|
||||
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)}'`
|
||||
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
|
||||
if [ $(bc -l <<< "${temp_f} >= ${temp_warn}") -eq 1 ] && [ $(bc -l <<< "${temp_f} < ${temp_crit}") -eq 1 ]; then
|
||||
lclr="${idsCL[Yellow]}"
|
||||
lmd="WARNING "
|
||||
elif [ $(bc -l <<< "${temp_f} >= ${temp_crit}") -eq 1 ]; then
|
||||
|
||||
if [ $(bc -l <<< "${temp_f} >= ${temp_crit}") -eq 1 ] || ([ "${TTYPE}" == "fans" ] && [ $(bc -l <<< "${temp_f} > $(bc <<< "scale=2; ${GL_HIGH}+5")") -eq 1 ]); then
|
||||
lclr="${idsCL[LightRed]}"
|
||||
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
|
||||
lclr="${idsCL[Green]}"
|
||||
lmd="Normal "
|
||||
@@ -290,7 +291,7 @@ CHECKTEMP(){
|
||||
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
|
||||
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}"
|
||||
else
|
||||
averagedisp="${idsCL[Green]}${average_disp}"
|
||||
|
||||
Reference in New Issue
Block a user