Update nodemgmt-scripts.sh

This commit is contained in:
2019-02-06 19:36:40 -06:00
parent 6a5dac2db4
commit b1890f3273

View File

@@ -79,14 +79,15 @@ 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 [ "${synccheck}" = "" ]; do
synccheck=true
until [ -z ${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`
synccheck="${synccheck}${check}"
#synccheck="${synccheck}${check}"
fi
done
done