Update powerwall.sh

This commit is contained in:
2024-02-10 18:17:18 -06:00
parent a15f10e576
commit c2127627b4

View File

@@ -760,15 +760,15 @@ DOWNLIST(){
for downitem in ${DOWNLIST[@]}; do
ditem=${downitem##*/}; ditem=${ditem//.down}
if [ "${PW_SENSOR_TYPE[${ditem}]}" == "esxi" ]; then
itemname=${ditem}-Probe
itemname=${ditem}
itemtype="ESXi HOST"
itemaddr=${PW_HOST_ADDRESSES[${ditem}]}
elif [ "${PW_SENSOR_TYPE[${ditem}]}" == "system" ] || [ "${PW_SENSOR_TYPE[${ditem}]}" == "cpu" ] || [ "${PW_SENSOR_TYPE[${ditem}]}" == "remotesystem" ]; then
itemname=${ditem}-Probe
itemname=${ditem}
itemtype=DEVICE
itemaddr=${PW_REMOTE_SENSORS[${ditem}]}
else
itemname=${ditem}-Probe
itemname=${ditem}
itemtype=SENSOR
itemaddr=''
fi
@@ -784,7 +784,7 @@ DOWNLIST(){
c=0; spc2=''; spc1=`expr ${cw2} - ${#host}`; until [ $c = ${spc1} ]; do spc2="${spc2} "; c=`expr $c + 1`; done
time=$(SHOW_TIME ${toterrtime})
if [ "${1}" == "report" ]; then
echo -e "${idsCL[LightRed]}${itemtype}${spca}${itemname}${spc}${host}${spc2}${time}${idsCL[Default]}"
echo -e "${idsCL[LightRed]}${itemtype}${spca}${itemname}${spc}${itemaddr}${spc2}${time}${idsCL[Default]}"
else
if [ "${choice^^}" == "A" ] || ([[ ${choice} == ?(-)+([0-9]) ]] && [ ${choice} -gt 0 ] 2>/dev/null && [ ${is} -eq ${choice} ]); then
[ ! -f ${PW_TMPFOLDER}/${ditem}.disable ] && touch ${PW_TMPFOLDER}/${ditem}.disable || rm -f ${PW_TMPFOLDER}/${ditem}.disable