Update nodemgmt-scripts.sh

This commit is contained in:
2023-11-22 21:42:39 -06:00
parent d3a061329d
commit 43bad4960d

View File

@@ -860,10 +860,14 @@ GUI(){
checknpmcerts) CHECK_NPMCERTS;; checknpmcerts) CHECK_NPMCERTS;;
checkcerts) CHECK-CERTS ${2} ${3} ${4} ${5} ${6};; checkcerts) CHECK-CERTS ${2} ${3} ${4} ${5} ${6};;
nightlyrenew) nightlyrenew)
mv -f ${NM_LOGFOLDER}/cert-renewal1.lastrun ${NM_LOGFOLDER}/cert-renewal2.lastrun >/dev/null 2>&1 if [ "${2}" == "q" ]; then
mv -f ${NM_LOGFOLDER}/cert-renewal.lastrun ${NM_LOGFOLDER}/cert-renewal1.lastrun >/dev/null 2>&1 exec 3>&1 >>${NM_LOGFOLDER}/cert-renewal.lastrun 2>&1
NIGHTLYRENEW > ${NM_LOGFOLDER}/cert-renewal.lastrun echo "$(date +%Y-%m-%d-%H-%M-%S) #### vCenter Update Initiated ####"
echo -e "\n$(date +%Y-%m-%d-%H-%M-%S)" >> ${NM_CERTPATH}/cert-renewal.lastrun 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};; delsite) DELSITE ${2} ${3} ${4} ${5};;
delsites) DELSITES;; delsites) DELSITES;;
@@ -977,9 +981,9 @@ GUI(){
vc-ssl) vc-ssl)
if [ "${2,,}" == "log" ] || [ "${3,,}" == "log" ]; then if [ "${2,,}" == "log" ] || [ "${3,,}" == "log" ]; then
exec 3>&1 >>${NM_LOGFOLDER}/vc-ssl.log 2>&1 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 ${NM_SCRIPT} vc-ssl ${2} report
echo "$(date) #### vCenter Update Completed #### echo "$(date +%Y-%m-%d-%H-%M-%S) #### vCenter Update Completed ####
" "
else else
VCENTER-SSL ${2,,} VCENTER-SSL ${2,,}