Update powerwall.sh
This commit is contained in:
@@ -755,12 +755,12 @@ DOWNLIST(){
|
|||||||
DIVIDER false yellow ${dlen}
|
DIVIDER false yellow ${dlen}
|
||||||
|
|
||||||
until [ "${choice^^}" = "E" ]; do
|
until [ "${choice^^}" = "E" ]; do
|
||||||
cw=23; cw1=12; cw2=20; is=1;
|
cw=22; cw1=12; cw2=20; is=1;
|
||||||
for downitem in ${DOWNLIST[@]}; do
|
for downitem in ${DOWNLIST[@]}; do
|
||||||
ditem=${downitem##*/}; ditem=${ditem//.down}
|
ditem=${downitem##*/}; ditem=${ditem//.down}
|
||||||
if [ "${PW_SENSOR_TYPE[${ditem}]}" == "esxi" ]; then
|
if [ "${PW_SENSOR_TYPE[${ditem}]}" == "esxi" ]; then
|
||||||
itemname=${ditem}
|
itemname=${ditem}
|
||||||
itemtype="ESXi HOST"
|
itemtype=ESXi-HOST
|
||||||
itemaddr=${PW_HOST_ADDRESSES[${ditem}]}
|
itemaddr=${PW_HOST_ADDRESSES[${ditem}]}
|
||||||
elif [ "${PW_SENSOR_TYPE[${ditem}]}" == "system" ] || [ "${PW_SENSOR_TYPE[${ditem}]}" == "cpu" ] || [ "${PW_SENSOR_TYPE[${ditem}]}" == "remotesystem" ]; then
|
elif [ "${PW_SENSOR_TYPE[${ditem}]}" == "system" ] || [ "${PW_SENSOR_TYPE[${ditem}]}" == "cpu" ] || [ "${PW_SENSOR_TYPE[${ditem}]}" == "remotesystem" ]; then
|
||||||
itemname=${ditem}
|
itemname=${ditem}
|
||||||
@@ -784,7 +784,7 @@ DOWNLIST(){
|
|||||||
|
|
||||||
c=0; spc=''; spc1=`expr ${cw} - ${#itemname}`; until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
c=0; spc=''; spc1=`expr ${cw} - ${#itemname}`; until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
||||||
c=0; spca=''; spc1=`expr ${cw1} - ${#itemtype}`; until [ $c = ${spc1} ]; do spca="${spca} "; c=`expr $c + 1`; done
|
c=0; spca=''; spc1=`expr ${cw1} - ${#itemtype}`; until [ $c = ${spc1} ]; do spca="${spca} "; c=`expr $c + 1`; done
|
||||||
c=0; spc2=''; spc1=`expr ${cw2} - ${#host}`; until [ $c = ${spc1} ]; do spc2="${spc2} "; c=`expr $c + 1`; done
|
c=0; spc2=''; spc1=`expr ${cw2} - ${#itemaddr}`; until [ $c = ${spc1} ]; do spc2="${spc2} "; c=`expr $c + 1`; done
|
||||||
time=$(SHOW_TIME ${toterrtime})
|
time=$(SHOW_TIME ${toterrtime})
|
||||||
if [ "${1}" == "report" ]; then
|
if [ "${1}" == "report" ]; then
|
||||||
echo -e "${idsCL[LightRed]}${itemtype}${spca}${itemname}${spc}${itemaddr}${spc2}${time}${idsCL[Default]}"
|
echo -e "${idsCL[LightRed]}${itemtype}${spca}${itemname}${spc}${itemaddr}${spc2}${time}${idsCL[Default]}"
|
||||||
|
|||||||
Reference in New Issue
Block a user