Update powerwall.sh

This commit is contained in:
2024-01-13 23:09:50 -06:00
parent ac3202539b
commit daac50b135

View File

@@ -516,14 +516,19 @@ HOSTMGMT(){
hostname=${PW_iDRACHOST_SHORTNAMES[${idracip}]} hostname=${PW_iDRACHOST_SHORTNAMES[${idracip}]}
fi fi
else else
cHOST='-help' echo -e "Usage: ${idsCL[Yellow]}pw host {host} {flags}${idsCL[Default]} {"
width=35
printf "%-${width}s- %s\n" " {host}" "(*required, can either be esxiIP,idracIP or Host#)"
printf "%-${width}s- %s\n" " -p|-power {on / off}" "Controls Host Power"
printf "%-${width}s- %s\n" " -e|-esxi {off / mm}" "Shuts down ESXi or puts into maintenance mode"
echo -e "}\n"
exit 0
fi fi
shift 1
while [ $# -gt 0 ]; do while [ $# -gt 0 ]; do
case "$1" in case "$1" in
-p|-power) POWER=${2}; MODE="power";; -p|-power) POWER=${2}; MODE="power";;
-e|-esxi) ESXI=${2}; MODE="esxi";; -e|-esxi) ESXI=${2}; MODE="esxi";;
*) -h|-help)
echo -e "Usage: ${idsCL[Yellow]}pw host {host} {flags}${idsCL[Default]} {" echo -e "Usage: ${idsCL[Yellow]}pw host {host} {flags}${idsCL[Default]} {"
width=35 width=35
printf "%-${width}s- %s\n" " {host}" "(*required, can either be esxiIP,idracIP or Host#)" printf "%-${width}s- %s\n" " {host}" "(*required, can either be esxiIP,idracIP or Host#)"