Update powerwall.sh
This commit is contained in:
@@ -28,7 +28,7 @@ CHECKTEMP(){
|
||||
if [ "${PW_SENSOR_TYPE[${SENSOR}]}" == "esxi" ]; then
|
||||
vHOSTIP=${PW_ESXI_MON_HOSTS[${SENSOR}]}
|
||||
vHOSTNAME=${PW_ESXI_HOST_NAMES[${vHOSTIP}]}
|
||||
echo -e "\r\033[K${idsCL[LightBlue]}${idsST[Bold]}${SENSOR} Host Sensors ${idsST[Reset]}- ${idsCL[LightCyan]}${PW_ESXI_HOST_NAMES[${vHOSTIP}]}${idsCL[Default]}"
|
||||
echo -e "\r\033[K${idsCL[LightCyan]}${idsST[Bold]}${SENSOR} Host Sensors ${idsST[Reset]}- ${idsCL[LightCyan]}${PW_ESXI_HOST_NAMES[${vHOSTIP}]}${idsCL[Default]}"
|
||||
echo -en "${idsCL[Yellow]}Pulling data and calculating averages for '${SENSOR}' ..."
|
||||
|
||||
if [ "$(CHECK_HOST ${vHOSTIP})" != "false" ]; then
|
||||
@@ -43,7 +43,7 @@ CHECKTEMP(){
|
||||
temp_crit=$(echo ${sensordata} | cut -d'p' -f2 | awk '/ / {print $4}' | sed -e 's/C//g'); temp_crit=${temp_crit/ /}
|
||||
reading=$(CHECKTEMPSENSOR ${SENSOR} ${temp_c} ${temp_warn} ${temp_crit})
|
||||
c=0; spc=''; spc1=`expr ${cw} - ${#vSENSOR} - 1`; until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
||||
echo -e "${idsCL[LightBlue]} ${vSENSOR}${spc}${idsCL[Default]}: ${reading}"
|
||||
echo -e "${idsCL[LightCyan]} ${vSENSOR}${spc}${idsCL[Default]}: ${reading}"
|
||||
|
||||
done
|
||||
else
|
||||
@@ -64,7 +64,7 @@ CHECKTEMP(){
|
||||
echo -en "${idsCL[Yellow]}Pulling data and calculating averages for '${SENSOR}' ..."
|
||||
reading=$(CHECKTEMPSENSOR ${SENSOR})
|
||||
c=0; spc=''; spc1=`expr ${cw} - ${#SENSOR}`; until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
||||
echo -e "\r\033[K${idsCL[LightCyan]}${SENSOR}${spc}${idsCL[Default]}: ${reading}"
|
||||
echo -e "\r\033[K${idsCL[LightCyan]}${idsST[Bold]}${SENSOR}${idsST[Reset]}${spc}${idsCL[Default]}: ${reading}"
|
||||
fi
|
||||
fi
|
||||
echo
|
||||
|
||||
Reference in New Issue
Block a user