diff --git a/test.sh b/test.sh index 9068a84..558fb3f 100755 --- a/test.sh +++ b/test.sh @@ -33,7 +33,7 @@ echo -en "${idsCL[LightYellow]}Waiting for nginx config replication across the n ${PH_CMD} rm -f /etc/nginx/test.repl ${PH_CMD} "echo -e \"Service ${1} ${2}\" > /etc/nginx/test.repl" for nip in "${WEB_HOSTS[@]}"; do - if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) != *"${WEB_HOSTS[0]}"* ]]; then + if [ "${nip}" != "${WEB_HOSTS[0]}" ]; then checked=false until [ "${checked}" = "" ]; do checked="`${PH_CMD} \"ssh root@${nip} \"cat /etc/nginx/test.repl\" | diff - /etc/nginx/test.repl\"`"