From b680e073d59fc42b806be1d681e67f3271bb2d43 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Wed, 6 Feb 2019 21:12:16 -0600 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index b2556911..51fcd109 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -129,6 +129,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` until [ "${checked}" = "" ]; do tchecked='' for nip in "${NODE_HOSTS[@]}"; do @@ -140,6 +141,11 @@ CERTRENEW(){ fi done checked=${tchecked} + if [ "`date +%s`" -gt "$timeout" ]; then + echo 'timeout' + + exit 1 + fi done SERVICE nginx reload 2>&1 | tee -a /opt/idssys/nodemgmt/cert-renewal.lastrun }