Update powerwall.sh

This commit is contained in:
2023-12-10 12:56:37 -06:00
parent 399e32fed6
commit 0391525098

View File

@@ -1263,7 +1263,7 @@ SHUTDOWN_SERVERS(){
if [ ! -f ${PW_FOLDER}/shutdown.main ]; then if [ ! -f ${PW_FOLDER}/shutdown.main ]; then
touch ${PW_FOLDER}/shutdown.main touch ${PW_FOLDER}/shutdown.main
if [ "${2}" == "TEMP" ]; then if [ "${2}" == "TEMP" ] && [ "${2}" != "maintenance" ]; then
MSG="Disabling CLS in vCenter" MSG="Disabling CLS in vCenter"
c=0; MSG_SPC=''; spc1=`expr ${hc_cw} - ${#MSG}`; until [ ${c} = ${spc1} ]; do MSG_SPC="${MSG_SPC} "; ((c++)); done c=0; MSG_SPC=''; spc1=`expr ${hc_cw} - ${#MSG}`; until [ ${c} = ${spc1} ]; do MSG_SPC="${MSG_SPC} "; ((c++)); done
echo -en "${idsCL[LightCyan]}${MSG}${MSG_SPC}: " echo -en "${idsCL[LightCyan]}${MSG}${MSG_SPC}: "
@@ -1326,6 +1326,7 @@ SHUTDOWN_SERVERS(){
fi fi
done done
echo echo
if [ "${2}" == "maintenance" ]; then
for ESXIHOST in "${PW_MAINHOSTS[@]}"; do for ESXIHOST in "${PW_MAINHOSTS[@]}"; do
MSG="Wait for VM's to power off, then shutdown '${PW_ESXI_HOST_NAMES[${ESXIHOST}]}'" MSG="Wait for VM's to power off, then shutdown '${PW_ESXI_HOST_NAMES[${ESXIHOST}]}'"
c=0; MSG_SPC=''; spc1=`expr ${hc_cw} - ${#MSG}`; until [ ${c} = ${spc1} ]; do MSG_SPC="${MSG_SPC} "; ((c++)); done c=0; MSG_SPC=''; spc1=`expr ${hc_cw} - ${#MSG}`; until [ ${c} = ${spc1} ]; do MSG_SPC="${MSG_SPC} "; ((c++)); done
@@ -1363,6 +1364,7 @@ SHUTDOWN_SERVERS(){
fi fi
echo echo
fi fi
fi
elif [ "${1^^}" == "SYS" ]; then elif [ "${1^^}" == "SYS" ]; then
[ ! -f ${PW_FOLDER}/shutdown.main ] && [ "${2}" == "TEMP" ] && SHUTDOWN_SERVERS MAIN TEMP [ ! -f ${PW_FOLDER}/shutdown.main ] && [ "${2}" == "TEMP" ] && SHUTDOWN_SERVERS MAIN TEMP