Update temp.inc.sh
This commit is contained in:
@@ -1152,13 +1152,13 @@ SET_ESXI_FANSPEED(){
|
|||||||
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${fan} - ${SET_HOST} - ${MSG}" >> ${PW_LOGFOLDER}/esxi-fanspeeds.log
|
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${fan} - ${SET_HOST} - ${MSG}" >> ${PW_LOGFOLDER}/esxi-fanspeeds.log
|
||||||
|
|
||||||
if [ $(bc -l <<< "${SET_FanSpeed} < $(cat ${PW_TMPFOLDER}/.lastfancheck/${SET_HOST}.set | cut -d'~' -f 1)") -eq 1 ]; then
|
if [ $(bc -l <<< "${SET_FanSpeed} < $(cat ${PW_TMPFOLDER}/.lastfancheck/${SET_HOST}.set | cut -d'~' -f 1)") -eq 1 ]; then
|
||||||
if [ ${FAN_DECREASE} -eq 5 ]; then
|
if [ "${FAN_DECREASE}" == "5" ]; then
|
||||||
echo "${SET_FanSpeed}~d" >| ${PW_TMPFOLDER}/.lastfancheck/${SET_HOST}.set
|
echo "${SET_FanSpeed}~d" >| ${PW_TMPFOLDER}/.lastfancheck/${SET_HOST}.set
|
||||||
else
|
else
|
||||||
echo "${SET_FanSpeed}~dd" >| ${PW_TMPFOLDER}/.lastfancheck/${SET_HOST}.set
|
echo "${SET_FanSpeed}~dd" >| ${PW_TMPFOLDER}/.lastfancheck/${SET_HOST}.set
|
||||||
fi
|
fi
|
||||||
elif [ $(bc -l <<< "$(cat ${PW_TMPFOLDER}/.lastfancheck/${SET_HOST}.set | cut -d'~' -f 1) < ${SET_FanSpeed}") -eq 1 ]; then
|
elif [ $(bc -l <<< "$(cat ${PW_TMPFOLDER}/.lastfancheck/${SET_HOST}.set | cut -d'~' -f 1) < ${SET_FanSpeed}") -eq 1 ]; then
|
||||||
if [ ${FAN_INCREASE} -eq 5 ]; then
|
if [ "${FAN_INCREASE}" == "5" ]; then
|
||||||
echo "${SET_FanSpeed}~u" >| ${PW_TMPFOLDER}/.lastfancheck/${SET_HOST}.set
|
echo "${SET_FanSpeed}~u" >| ${PW_TMPFOLDER}/.lastfancheck/${SET_HOST}.set
|
||||||
else
|
else
|
||||||
echo "${SET_FanSpeed}~uu" >| ${PW_TMPFOLDER}/.lastfancheck/${SET_HOST}.set
|
echo "${SET_FanSpeed}~uu" >| ${PW_TMPFOLDER}/.lastfancheck/${SET_HOST}.set
|
||||||
|
|||||||
Reference in New Issue
Block a user