Update powerwall.sh

This commit is contained in:
2024-01-28 08:43:14 -06:00
parent 301ec83599
commit 86cbdad7e0

View File

@@ -264,9 +264,9 @@ SHUTDOWN_SERVER(){
MSG="Stopping all iSCSI VM's"
fi
c=0; MSG_SPC=''; spc1=`expr ${HC_CW} - ${#MSG}`; until [ ${c} = ${spc1} ]; do MSG_SPC="${MSG_SPC} "; ((c++)); done
echo -en "${idsCL[White]}${MSG//${PW_ESXI_HOST_NAMES[${ESXIHOST}]}/${idsCL[LightCyan]}${PW_ESXI_HOST_NAMES[${ESXIHOST}]}}${idsCL[White]}${MSG_SPC}: "
echo -en "${idsCL[White]}${MSG}${idsCL[White]}${MSG_SPC}: "
if [ "${TEST}" != "true" ]; then
if [ "$(ipmitool -I lanplus -H ${PW_HOST_IDRACS[${PW_ESXI_HOST_NAMES[${ESXIHOST}]}]} -U ${PW_ESXI_USER} -P "${PW_ESXI_PASS}" chassis power status | grep 'Power is on')" != "" ]; then
# if [ "$(ipmitool -I lanplus -H ${PW_HOST_IDRACS[${PW_ESXI_HOST_NAMES[${ESXIHOST}]}]} -U ${PW_ESXI_USER} -P "${PW_ESXI_PASS}" chassis power status | grep 'Power is on')" != "" ]; then
if [ "${ESXI_HOST}" == "10.10.2.10" ] || [ "${ESXI_HOST}" == "MAIN" ] || [ "${ESXI_HOST}" == "CONSERVE" ]; then
${PW_FOLDER}/esxi-scripts/iscsi-vm-shutdown.ps1 >/dev/null 2>&1 &
elif [ "${ESXI_HOST}" == "10.10.2.17" ] || [ "${ESXI_HOST}" == "SYS" ]; then
@@ -278,7 +278,7 @@ SHUTDOWN_SERVER(){
echo -e "${idsCL[Green]}Commands sent${idsCL[Default]}"
# else
# echo -e "${idsCL[Yellow]}Host Offline${idsCL[Default]}"
fi
# fi
else
echo -e "${idsCL[Yellow]}(TEST MODE)${idsCL[Default]}"
fi