From 042608f3471d4e12188d674d2cd8caf3a9309448 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Wed, 6 Feb 2019 21:22:26 -0600 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 9e84d740..44c2271e 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -168,7 +168,7 @@ CERTRENEW(){ DIVIDER true echo -en "${idsCL[LightYellow]}Waiting for certifcate replication between the nodes... ${idsCL[Default]}" checked=false - timeout=`date --date='10 seconds' +%s` + timeout=`date --date='1 minutes' +%s` until [ "${checked}" = "" ]; do tchecked='' for nip in "${NODE_HOSTS[@]}"; do @@ -181,11 +181,12 @@ CERTRENEW(){ done checked=${tchecked} if [ "`date +%s`" -gt "$timeout" ]; then - echo 'timeout' - + echo -e "${idsCL[Red]}Timeout${idsCL[Default]}" + echo "Timeout occured in waiting for replication between nodes." | mail -s "Nightly-Cert-Renewal" ${STATUS_CHECK_EMAIL} break fi done + echo -e "${idsCL[Green]}Completed${idsCL[Default]}" SERVICE nginx reload 2>&1 | tee -a /opt/idssys/nodemgmt/cert-renewal.lastrun } NIGHTLYRENEW(){ @@ -197,7 +198,7 @@ NIGHTLYRENEW(){ daterun=`date +%Y-%m-%d-%H-%M` echo -e "${daterun}" >> /etc/letsencrypt/cert-renewal.lastrun checked=false - timeout=`date --date='10 seconds' +%s` + timeout=`date --date='2 minutes' +%s` until [ "${checked}" = "" ]; do tchecked='' for nip in "${NODE_HOSTS[@]}"; do @@ -210,7 +211,7 @@ NIGHTLYRENEW(){ done checked=${tchecked} if [ "`date +%s`" -gt "$timeout" ]; then - echo "Timeout occured in waiting for replication between nodes." | mail -s "Cert-Renewal" ${STATUS_CHECK_EMAIL} + echo "Timeout occured in waiting for replication between nodes." | mail -s "Nightly-Cert-Renewal" ${STATUS_CHECK_EMAIL} break fi done