Update power.inc.sh

This commit is contained in:
2023-12-22 08:12:04 -06:00
parent b7650cac2a
commit 9a29b57ca4

View File

@@ -709,13 +709,13 @@ HOSTPOWER(){
if [ "${TEST}" != "true" ]; then
current_status=$(ipmitool -I lanplus -H ${idracip} -U ${PW_ESXI_USER} -P "${PW_ESXI_PASS}" chassis power status | grep 'Power is on')
if [ "${current_status}" == "" ]; then
# if [ "${current_status}" == "" ]; then
echo -e "${idsCL[Green]}"
ipmitool -I lanplus -H ${idracip} -U ${PW_ESXI_USER} -P "${PW_ESXI_PASS}" chassis power ${2,,}
else
echo -e "\n${idsCL[LightCyan]}Host is already Powered ON${idsCL[Default]}"
fi
# else
# echo -e "\n${idsCL[LightCyan]}Host is already Powered ON${idsCL[Default]}"
#
# fi
else
echo -e "\n${idsCL[Yellow]}(TEST MODE)"
fi