update
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
VERS='2.7.65-06302024'
|
||||
VERS='2.7.66-06302024'
|
||||
|
||||
noheader=' update service dailytemp confsync -r -report test '
|
||||
|
||||
|
||||
@@ -565,39 +565,40 @@ CHECKTEMP(){
|
||||
DIVIDER . white ${PRI_WIDTH}
|
||||
fi
|
||||
|
||||
if [ "${TTYPE}" == "fans" ]; then
|
||||
if [[ "${PW_ESXI_FANSPEEDCONTROL_HOSTS}" = *"${PW_HOST_IDRACS[${SENSOR}]}"* ]] && [[ "${sensorname}" = *"Exhaust"* ]]; then
|
||||
if [ -f ${PW_TMPFOLDER}/.lastfancheck/${cSENSOR}.gl ]; then
|
||||
FSC="${idsCL[LightGreen]}"
|
||||
elif [ -f ${PW_TMPFOLDER}/.lastfancheck/${cSENSOR}.set ]; then
|
||||
FSC="${idsCL[Green]}"
|
||||
else
|
||||
FSC="${idsCL[LightYellow]}"
|
||||
fi
|
||||
# echo -e " Goldilock Zone : ${idsCL[LightGreen]}${ESXI_DEFAULT_EXHAUST_MIN}°F (±${ESXI_FANSPEED_GL_ZONE}°F) ${idsCL[Default]}[ ${idsCL[Green]}${GL_LOW}°F${idsCL[Default]} <--> ${idsCL[LightYellow]}${GL_HIGH}°F${idsCL[Default]} ]"
|
||||
echo -e " Goldilock Zone : ${idsCL[LightGreen]}${ESXI_DEFAULT_EXHAUST_MIN}°F (±${ESXI_FANSPEED_GL_ZONE}°F)"
|
||||
echo -e " Last checked : ${idsCL[LightCyan]}$(date -r ${PW_TMPFOLDER}/.lastfancheck/${SENSOR} "+%m/%d @ %l:%M%p")${idsCL[Default]}"
|
||||
echo -en " Last set : ${FSC}$(date -r ${PW_TMPFOLDER}/.lastfancheck/${SENSOR}.set "+%m/%d @ %l:%M%p") "
|
||||
if [ "$(cat ${PW_TMPFOLDER}/.lastfancheck/${SENSOR}.set | cut -d'~' -f 2)" == "uu" ]; then
|
||||
echo -e "${idsCL[LightRed]}\u25B2 ${idsCL[Default]}"
|
||||
elif [ "$(cat ${PW_TMPFOLDER}/.lastfancheck/${SENSOR}.set | cut -d'~' -f 2)" == "u" ]; then
|
||||
echo -e "${idsCL[Magenta]}\u25B2 ${idsCL[Default]}"
|
||||
elif [ "$(cat ${PW_TMPFOLDER}/.lastfancheck/${SENSOR}.set | cut -d'~' -f 2)" == "dd" ]; then
|
||||
echo -e "${idsCL[LightGreen]}\u25BC ${idsCL[Default]}"
|
||||
elif [ "$(cat ${PW_TMPFOLDER}/.lastfancheck/${SENSOR}.set | cut -d'~' -f 2)" == "d" ]; then
|
||||
echo -e "${idsCL[LightCyan]}\u25BC ${idsCL[Default]}"
|
||||
elif [ "$(cat ${PW_TMPFOLDER}/.lastfancheck/${SENSOR}.set | cut -d'~' -f 2)" == "m" ]; then
|
||||
echo -e "${idsCL[LightCyan]}\u2720 ${idsCL[Default]}"
|
||||
else
|
||||
echo -e "${idsCL[Default]}"
|
||||
fi
|
||||
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
((t++))
|
||||
done
|
||||
if [ "${TTYPE}" == "fans" ]; then
|
||||
if [[ "${PW_ESXI_FANSPEEDCONTROL_HOSTS}" = *"${PW_HOST_IDRACS[${SENSOR}]}"* ]]; then
|
||||
if [ -f ${PW_TMPFOLDER}/.lastfancheck/${cSENSOR}.gl ]; then
|
||||
FSC="${idsCL[LightGreen]}"
|
||||
elif [ -f ${PW_TMPFOLDER}/.lastfancheck/${cSENSOR}.set ]; then
|
||||
FSC="${idsCL[Green]}"
|
||||
else
|
||||
FSC="${idsCL[LightYellow]}"
|
||||
fi
|
||||
# echo -e " Goldilock Zone : ${idsCL[LightGreen]}${ESXI_DEFAULT_EXHAUST_MIN}°F (±${ESXI_FANSPEED_GL_ZONE}°F) ${idsCL[Default]}[ ${idsCL[Green]}${GL_LOW}°F${idsCL[Default]} <--> ${idsCL[LightYellow]}${GL_HIGH}°F${idsCL[Default]} ]"
|
||||
echo -e " Goldilock Zone : ${idsCL[LightGreen]}${ESXI_DEFAULT_EXHAUST_MIN}°F (±${ESXI_FANSPEED_GL_ZONE}°F)"
|
||||
echo -e " Last checked : ${idsCL[LightCyan]}$(date -r ${PW_TMPFOLDER}/.lastfancheck/${SENSOR} "+%m/%d @ %l:%M%p")${idsCL[Default]}"
|
||||
echo -en " Last set : ${FSC}$(date -r ${PW_TMPFOLDER}/.lastfancheck/${SENSOR}.set "+%m/%d @ %l:%M%p") "
|
||||
if [ "$(cat ${PW_TMPFOLDER}/.lastfancheck/${SENSOR}.set | cut -d'~' -f 2)" == "uu" ]; then
|
||||
echo -e "${idsCL[LightRed]}\u25B2 ${idsCL[Default]}"
|
||||
elif [ "$(cat ${PW_TMPFOLDER}/.lastfancheck/${SENSOR}.set | cut -d'~' -f 2)" == "u" ]; then
|
||||
echo -e "${idsCL[Magenta]}\u25B2 ${idsCL[Default]}"
|
||||
elif [ "$(cat ${PW_TMPFOLDER}/.lastfancheck/${SENSOR}.set | cut -d'~' -f 2)" == "dd" ]; then
|
||||
echo -e "${idsCL[LightGreen]}\u25BC ${idsCL[Default]}"
|
||||
elif [ "$(cat ${PW_TMPFOLDER}/.lastfancheck/${SENSOR}.set | cut -d'~' -f 2)" == "d" ]; then
|
||||
echo -e "${idsCL[LightCyan]}\u25BC ${idsCL[Default]}"
|
||||
elif [ "$(cat ${PW_TMPFOLDER}/.lastfancheck/${SENSOR}.set | cut -d'~' -f 2)" == "m" ]; then
|
||||
echo -e "${idsCL[LightCyan]}\u2720 ${idsCL[Default]}"
|
||||
else
|
||||
echo -e "${idsCL[Default]}"
|
||||
fi
|
||||
|
||||
else
|
||||
echo -e " Fans are not managed for this host"
|
||||
fi
|
||||
if [ "${TTYPE}" == "fans" ] && [[ "${PW_ESXI_FANSPEEDCONTROL_HOSTS}" != *"${PW_HOST_IDRACS[${SENSOR}]}"* ]]; then
|
||||
echo -e " Fans are not managed for this host"
|
||||
fi
|
||||
else
|
||||
echo -e "${idsCL[LightCyan]} ${vHOSTNAME}${spc}${idsCL[Default]}: No Data"
|
||||
@@ -614,12 +615,8 @@ CHECKTEMP(){
|
||||
fi
|
||||
# fi
|
||||
|
||||
if [ "${TTYPE}" == "fans" ] && [ "${SENSOR}" == "iDS-vMS-Host6" ] && [ ! -f ${PW_TMPFOLDER}/${SENSOR}.down ]; then
|
||||
if [[ "${PW_ESXI_FANSPEEDCONTROL_HOSTS}" = *"${PW_HOST_IDRACS[iDS-vMS-Host6]}"* ]]; then
|
||||
echo -e "${idsCL[LightYellow]}${SENSOR} PSU is not compatible, Fans are instead synced with 'iDS-vMS-Host7'${idsCL[Default]}"
|
||||
# else
|
||||
# echo -e " xFans are not managed for this host"
|
||||
fi
|
||||
if [ "${TTYPE}" == "fans" ] && [ "${SENSOR}" == "iDS-vMS-Host6" ] && [ ! -f ${PW_TMPFOLDER}/${SENSOR}.down ] && [[ "${PW_ESXI_FANSPEEDCONTROL_HOSTS}" = *"${PW_HOST_IDRACS[iDS-vMS-Host6]}"* ]]; then
|
||||
echo -e "${idsCL[LightYellow]}${SENSOR} PSU is not compatible, Fans are instead synced with 'iDS-vMS-Host7'${idsCL[Default]}"
|
||||
fi
|
||||
# ([ "${TTYPE}" != "fans" ] || ([ "${TTYPE}" == "fans" ] && [ "${SENSOR}" != "iDS-vMS-Host6" ])) && echo
|
||||
echo
|
||||
|
||||
Reference in New Issue
Block a user