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