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 }