Update temp.inc.sh
This commit is contained in:
@@ -139,16 +139,16 @@ CHECKTEMP(){
|
|||||||
fi
|
fi
|
||||||
if [ -f ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old2 ]; then
|
if [ -f ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old2 ]; then
|
||||||
if [ $(bc -l <<< "${temp_f} <= $(echo "scale=2; $(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old2 | cut -d'~' -f 1)+${PW_TEMPIND_DIFF}" | bc)") -eq 1 ] && [ $(bc -l <<< "${temp_f} >= $(echo "scale=2; $(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old2 | cut -d'~' -f 1)-${PW_TEMPIND_DIFF}" | bc)") -eq 1 ]; then
|
if [ $(bc -l <<< "${temp_f} <= $(echo "scale=2; $(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old2 | cut -d'~' -f 1)+${PW_TEMPIND_DIFF}" | bc)") -eq 1 ] && [ $(bc -l <<< "${temp_f} >= $(echo "scale=2; $(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old2 | cut -d'~' -f 1)-${PW_TEMPIND_DIFF}" | bc)") -eq 1 ]; then
|
||||||
reading="${reading} ${idsCL[LightCyan]}\u23F9 "
|
reading="${reading}${idsCL[LightCyan]}\u23F9 "
|
||||||
elif [ $(bc -l <<< "$(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old2 | cut -d'~' -f 1) < ${temp_f}") -eq 1 ]; then
|
elif [ $(bc -l <<< "$(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old2 | cut -d'~' -f 1) < ${temp_f}") -eq 1 ]; then
|
||||||
reading="${reading} ${idsCL[LightRed]}\u25B2 "
|
reading="${reading}${idsCL[LightRed]}\u25B2 "
|
||||||
elif [ $(bc -l <<< "${temp_f} < $(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old2 | cut -d'~' -f 1)") -eq 1 ]; then
|
elif [ $(bc -l <<< "${temp_f} < $(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}.old2 | cut -d'~' -f 1)") -eq 1 ]; then
|
||||||
reading="${reading} ${idsCL[LightGreen]}\u25BC "
|
reading="${reading} ${idsCL[LightGreen]}\u25BC "
|
||||||
else
|
else
|
||||||
reading="${reading} "
|
reading="${reading} "
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
reading="${reading} "
|
reading="${reading} "
|
||||||
fi
|
fi
|
||||||
elif [ "${avgdays}" = "noavg" ]; then
|
elif [ "${avgdays}" = "noavg" ]; then
|
||||||
reading="${reading} "
|
reading="${reading} "
|
||||||
@@ -192,7 +192,7 @@ CHECKTEMP(){
|
|||||||
fws=10
|
fws=10
|
||||||
tmp="${spca}${average_disp}${GAUGESH}"
|
tmp="${spca}${average_disp}${GAUGESH}"
|
||||||
else
|
else
|
||||||
fws=15
|
fws=16
|
||||||
tmp="${spct}${temp_f_disp}${GAUGESH}"
|
tmp="${spct}${temp_f_disp}${GAUGESH}"
|
||||||
fi
|
fi
|
||||||
c=0; spc=''; spc1=`expr ${fws} - ${#tmp}`; until [ ${c} = ${spc1} ]; do spc="${spc} "; c=`expr ${c} + 1`; done
|
c=0; spc=''; spc1=`expr ${fws} - ${#tmp}`; until [ ${c} = ${spc1} ]; do spc="${spc} "; c=`expr ${c} + 1`; done
|
||||||
@@ -327,16 +327,16 @@ CHECKTEMP(){
|
|||||||
fi
|
fi
|
||||||
if [ -f ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old2 ]; then
|
if [ -f ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old2 ]; then
|
||||||
if [ $(bc -l <<< "${temp_f} <= $(echo "scale=2; $(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old2 | cut -d'~' -f 1)+${PW_TEMPIND_DIFF}" | bc)") -eq 1 ] && [ $(bc -l <<< "${temp_f} >= $(echo "scale=2; $(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old2 | cut -d'~' -f 1)-${PW_TEMPIND_DIFF}" | bc)") -eq 1 ]; then
|
if [ $(bc -l <<< "${temp_f} <= $(echo "scale=2; $(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old2 | cut -d'~' -f 1)+${PW_TEMPIND_DIFF}" | bc)") -eq 1 ] && [ $(bc -l <<< "${temp_f} >= $(echo "scale=2; $(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old2 | cut -d'~' -f 1)-${PW_TEMPIND_DIFF}" | bc)") -eq 1 ]; then
|
||||||
echo -en " ${idsCL[LightCyan]}\u23F9 "
|
echo -en "${idsCL[LightCyan]}\u23F9 "
|
||||||
elif [ $(bc -l <<< "$(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old2 | cut -d'~' -f 1) < ${temp_f}") -eq 1 ]; then
|
elif [ $(bc -l <<< "$(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old2 | cut -d'~' -f 1) < ${temp_f}") -eq 1 ]; then
|
||||||
echo -en " ${idsCL[LightRed]}\u25B2 "
|
echo -en "${idsCL[LightRed]}\u25B2 "
|
||||||
elif [ $(bc -l <<< "${temp_f} < $(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old2 | cut -d'~' -f 1)") -eq 1 ]; then
|
elif [ $(bc -l <<< "${temp_f} < $(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old2 | cut -d'~' -f 1)") -eq 1 ]; then
|
||||||
echo -en " ${idsCL[LightGreen]}\u25BC "
|
echo -en "${idsCL[LightGreen]}\u25BC "
|
||||||
else
|
else
|
||||||
echo -en " "
|
echo -en " "
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo -en " "
|
echo -en " "
|
||||||
fi
|
fi
|
||||||
elif [ "${avgdays}" = "noavg" ]; then
|
elif [ "${avgdays}" = "noavg" ]; then
|
||||||
echo -en " "
|
echo -en " "
|
||||||
@@ -360,7 +360,7 @@ CHECKTEMP(){
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${average}" != "" ] || [ "${temp_f}" != "" ]; then
|
if [ "${average}" != "" ] || [ "${temp_f}" != "" ]; then
|
||||||
[ "${average}" != "" ] && fws=11 || fws=15
|
[ "${average}" != "" ] && fws=11 || fws=16
|
||||||
[ ${#temp_warn} == 2 ] && spcw=' ' || spcw=' '
|
[ ${#temp_warn} == 2 ] && spcw=' ' || spcw=' '
|
||||||
[ ${#temp_crit} == 2 ] && spcc=' ' || spcc=' '
|
[ ${#temp_crit} == 2 ] && spcc=' ' || spcc=' '
|
||||||
if [ "${TTYPE}" == "fans" ]; then
|
if [ "${TTYPE}" == "fans" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user