Update powerwall.sh

This commit is contained in:
2023-10-31 09:39:20 -05:00
parent 4423685e07
commit 4c051f8d5c

View File

@@ -598,11 +598,13 @@ CHECKPOWER(){
for hostfile in "${PW_TMPFOLDER}/*.hostpower"; do for hostfile in "${PW_TMPFOLDER}/*.hostpower"; do
if [ -f ${hostfile} ]; then if [ -f ${hostfile} ]; then
host=${hostfile%.*}; host=${host##*/} host=${hostfile%.*}; host=${host##*/}
if [ "${host}" != "*" ]; then
watts=$(cat ${hostfile}) watts=$(cat ${hostfile})
# echo -e "${idsCL[LightCyan]}HOST '${PW_iDRACHOST_SHORTNAMES[${host}]}' ${idsCL[Default]}: ${idsCL[Green]}${watts}W${idsCL[Default]}" # echo -e "${idsCL[LightCyan]}HOST '${PW_iDRACHOST_SHORTNAMES[${host}]}' ${idsCL[Default]}: ${idsCL[Green]}${watts}W${idsCL[Default]}"
echo -e "${idsCL[LightCyan]}HOST '${host}' ${idsCL[Default]}: ${idsCL[Green]}${watts}W${idsCL[Default]}" echo -e "${idsCL[LightCyan]}HOST '${host}' ${idsCL[Default]}: ${idsCL[Green]}${watts}W${idsCL[Default]}"
mv ${hostfile} ${hostfile}.done mv ${hostfile} ${hostfile}.done
fi fi
fi
done done
[ -f ${PW_TMPFOLDER}/done.hostpower ] && checked=done [ -f ${PW_TMPFOLDER}/done.hostpower ] && checked=done
done done