This commit is contained in:
2023-08-20 12:45:06 -05:00
parent c306ac2c80
commit b0e34c3e24
2 changed files with 6 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
VERS='2.2.52-08202023'
VERS='2.2.55-08202023'
noheader=' update service dailytemp '

View File

@@ -391,7 +391,8 @@ DAILYTEMP(){
temp_c=${temp_c%\'*}; temp_c=${temp_c#*=}
elif [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "esxi" ]; then
temp_c=$(echo ${SENSOR} | cut -d'p' -f2 | awk '/ / {print $2}' | sed -e 's/C//g'); temp_c=${temp_c/ /}
temp_c=$(echo ${SENSOR} | cut -d'p' -f2 | awk '/ / {print $2}' | sed -e 's/C//g');
temp_c=${temp_c/ /}
vSENSOR=$(echo ${SENSOR} | cut -d'T' -f1 | xargs)
SENSOR="${SENSORa}-${vSENSOR// /_}"
@@ -401,10 +402,10 @@ DAILYTEMP(){
fi
if [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "esxi" ]; then
average1=$(AVERAGETEMP ${PW_SENSOR_ID[${SENSORa}]} 1 ${vSENSOR// /_})
# average7=$(AVERAGETEMP ${PW_SENSOR_ID[$SENSOR]} 7 ${vSENSOR// /_})
average7=$(AVERAGETEMP ${PW_SENSOR_ID[${SENSORa}]} 7 ${vSENSOR// /_})
else
average1=$(AVERAGETEMP ${PW_SENSOR_ID[$SENSORa]} 1)
# average7=$(AVERAGETEMP ${PW_SENSOR_ID[$SENSORa]} 7)
average1=$(AVERAGETEMP ${PW_SENSOR_ID[${SENSORa}]} 1)
average7=$(AVERAGETEMP ${PW_SENSOR_ID[${SENSORa}]} 7)
fi
c=0; spc=''; spc1=`expr ${cw} - ${#SENSOR}`; until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done