Update nodemgmt-scripts.sh

This commit is contained in:
2022-06-04 09:07:04 -05:00
parent 8a02872188
commit 562dfd1e60

View File

@@ -1680,15 +1680,15 @@ VCENTER-SSL(){
SERVER="https://${VCHOSTNAME}" SERVER="https://${VCHOSTNAME}"
CRED="administrator@scity.vs:$(pass iDSVC)" CRED="administrator@scity.vs:$(pass iDSVC)"
echo -en "${idsCL[LightCyan]}Checking if certificate needs to be updated on vCenter... ${idsCL[Default]}" echo -en "${idsCL[LightCyan]}Checking days left on vCenter cert... ${idsCL[Default]}"
VCCERTDAYS=$(${FOLDER}/ssl-cert-check/ssl-cert-check -p 443 -s ${VCHOSTNAME} -N) VCCERTDAYS=$(${FOLDER}/ssl-cert-check/ssl-cert-check -p 443 -s ${VCHOSTNAME} -N)
VCCERTDAYS=${VCCERTDAYS#*=} VCCERTDAYS=${VCCERTDAYS#*=}
if [ "${VCCERTDAYS}" -lt "29" ]; then if [ "${VCCERTDAYS}" -lt "29" ]; then
echo -e "${idsCL[Green]}Certificate is still valid for ${VCCERTDAYS} days yet, no noeed to update${idsCL[Default]}" echo -e "${idsCL[Green]}${VCCERTDAYS} days left, Certificate is still valid, no noeed to update${idsCL[Default]}"
exit 0 exit 0
else else
echo -e "${idsCL[Green]}Certificate needs to be updated${idsCL[Default]}" echo -e "${idsCL[Yellow]}${VCCERTDAYS} days left, Certificate needs to be updated${idsCL[Default]}"
echo echo
fi fi
@@ -1717,7 +1717,7 @@ VCENTER-SSL(){
echo -e "${idsCL[Green]}Done${idsCL[Default]}" echo -e "${idsCL[Green]}Done${idsCL[Default]}"
echo echo
echo -e "${idsCL[Green]}The vCenter certifcate has been updated${idsCL[Default]}" echo -e "${idsCL[Green]}The vCenter certifcate has been updated${idsCL[Default]}"
echo
} }
ADD_LOGROTATE_CRONTAB(){ ADD_LOGROTATE_CRONTAB(){
if ! crontab -l | grep -q '/opt/idssys/nodemgmt/tmp-logrotate'; then if ! crontab -l | grep -q '/opt/idssys/nodemgmt/tmp-logrotate'; then