Update powerwall.sh

This commit is contained in:
2023-10-31 11:20:58 -05:00
parent db7e75cfcd
commit e282cace86

View File

@@ -599,8 +599,9 @@ CHECKPOWER(){
if [ "${host}" != "*" ] && [ "${host}" != "done" ]; then
watts=$(cat ${hostfile})
if [ "${watts}" == "down" ]; then hostpower="${idsCL[Red]}Host Offline"
elif [ "${watts}" == "0" ]; then hostpower="${idsCL[Default]}n/a"
else hostpower="${idsCL[Green]}${watts} W"
elif [ "${watts}" == "0" ]; then hostpower="${idsCL[Default]}n/a"
else hostpower="${idsCL[Green]}${watts} W"
fi
echo -e "${idsCL[LightCyan]}HOST '${PW_iDRACHOST_SHORTNAMES[${host}]}' ${idsCL[Default]}: ${hostpower}${idsCL[Default]}"
mv ${hostfile} ${hostfile}.done