From 9214638f0373494195b7c28036de730b2e7cc48a Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sun, 22 Dec 2019 10:29:05 -0600 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index c24c585e..b6394efc 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -1652,19 +1652,7 @@ if [ ${action-x} ]; then certrenew) CERTRENEW;; delssl) DEL-SSL ${2};; listcerts) LISTCERTS;; - checkcerts) - if [ "${2}" = "report" ]; then - rm -f ${FOLDER}/status-check.lastrun - #CHECK-CERTS report > ${FOLDER}/status-check.lastrun - if [ "${3}" = "email" ] && [ "${STATUS_CHECK_EMAIL}" != "" ]; then - STATUSLOG="$(cat ${FOLDER}/status-check.lastrun)" - echo "Status Report\n\n${STATUSLOG}" | mail -s "Status Report" david@schroedercity.com - echo "Status Report\n\n${STATUSLOG}" | mail -s "Status Report" 9208839613@vzwpix.com - fi - else - CHECK-CERTS ${2} - fi;; - + checkcerts) CHECK-CERTS ${2};; nightlyrenew) NIGHTLYRENEW;; delsite) DELSITE ${2} ${3} ${4} ${5};; delsites) DELSITES;; @@ -1672,7 +1660,18 @@ if [ ${action-x} ]; then update) ;; update-nodes) NODEUPDATE ${2};; backup) BACKUP;; - status) STATUS ${2};; + status) + if [ "${2}" = "report" ]; then + rm -f ${FOLDER}/status-check.lastrun + STATUS report > ${FOLDER}/status-check.lastrun + if [ "${3}" = "email" ] && [ "${STATUS_CHECK_EMAIL}" != "" ]; then + STATUSLOG="$(cat ${FOLDER}/status-check.lastrun)" + echo "Status Report\n\n${STATUSLOG}" | mail -s "Status Report" david@schroedercity.com + echo "Status Report\n\n${STATUSLOG}" | mail -s "Status Report" 9208839613@vzwpix.com + fi + else + STATUS ${2} + fi;; status-check) STATUS-CHECK ${2};; set-permissions) SET-PERMISSIONS ${2};; service)