From 6a5dac2db4be8bf65711c669b656e99e77230979 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Wed, 6 Feb 2019 19:34:46 -0600 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index a2a3911b..ae414379 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -79,17 +79,14 @@ NEWCERT(){ do_with_root chmod -R 6775 /etc/letsencrypt 2>&1 | tee /opt/idssys/nodemgmt/cert-request.lastrun yes | cp -rfH /opt/idssys/nodemgmt/cert-request.lastrun /etc/letsencrypt/cert-request.lastrun echo -en "${idsCL[LightYellow]}Waiting for certifcate replication between the nodes... ${idsCL[Default]}" - until [ "${synccomplete}" = "true" ]; do - synccomplete=true + until [ "${synccheck}" = "" ]; do for nip in "${NODE_HOSTS[@]}"; do if [[ $(/sbin/ip -o -4 addr list ens192 | awk '{print $4}' | cut -d/ -f1) == *"${nip}"* ]]; then NCMD='' else NCMD="ssh root@${nip}" fi if [ "${NCMD}" != "" ]; then check=`${NCMD} "cat /etc/letsencrypt/cert-request.lastrun" | diff - /etc/letsencrypt/cert-request.lastrun` - if [ "${check}" != "" ]; then - synccomplete=false - fi + synccheck="${synccheck}${check}" fi done done