From 43bad4960df1f0e96957a84360eaa645953dc797 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Wed, 22 Nov 2023 21:42:39 -0600 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 4929983d..8bda1cd1 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -860,10 +860,14 @@ GUI(){ checknpmcerts) CHECK_NPMCERTS;; checkcerts) CHECK-CERTS ${2} ${3} ${4} ${5} ${6};; nightlyrenew) - mv -f ${NM_LOGFOLDER}/cert-renewal1.lastrun ${NM_LOGFOLDER}/cert-renewal2.lastrun >/dev/null 2>&1 - mv -f ${NM_LOGFOLDER}/cert-renewal.lastrun ${NM_LOGFOLDER}/cert-renewal1.lastrun >/dev/null 2>&1 - NIGHTLYRENEW > ${NM_LOGFOLDER}/cert-renewal.lastrun - echo -e "\n$(date +%Y-%m-%d-%H-%M-%S)" >> ${NM_CERTPATH}/cert-renewal.lastrun + if [ "${2}" == "q" ]; then + exec 3>&1 >>${NM_LOGFOLDER}/cert-renewal.lastrun 2>&1 + echo "$(date +%Y-%m-%d-%H-%M-%S) #### vCenter Update Initiated ####" + mv -f ${NM_LOGFOLDER}/cert-renewal1.lastrun ${NM_LOGFOLDER}/cert-renewal2.lastrun + mv -f ${NM_LOGFOLDER}/cert-renewal.lastrun ${NM_LOGFOLDER}/cert-renewal1.lastrun + fi + ${NM_SCRIPT} nightlyrenew report + echo -e "\n$(date +%Y-%m-%d-%H-%M-%S)" ;; delsite) DELSITE ${2} ${3} ${4} ${5};; delsites) DELSITES;; @@ -977,9 +981,9 @@ GUI(){ vc-ssl) if [ "${2,,}" == "log" ] || [ "${3,,}" == "log" ]; then exec 3>&1 >>${NM_LOGFOLDER}/vc-ssl.log 2>&1 - echo "$(date) #### vCenter Update Initiated ####" + echo "$(date +%Y-%m-%d-%H-%M-%S) #### vCenter Update Initiated ####" ${NM_SCRIPT} vc-ssl ${2} report - echo "$(date) #### vCenter Update Completed #### + echo "$(date +%Y-%m-%d-%H-%M-%S) #### vCenter Update Completed #### " else VCENTER-SSL ${2,,}