From 34220a0202a28e53ff3d3cc09e77515373dfd278 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Mon, 29 Aug 2022 18:54:27 +0200 Subject: [PATCH] =?utf8?q?Vorf=C3=BChr-Skript=20=C3=BCberarbeitet:=20Verei?= =?utf8?q?nfachte=20Abfrage=20f=C3=BCr=20User-Zustand?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- README.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.sh b/README.sh index 81213c1..3f74cd1 100755 --- a/README.sh +++ b/README.sh @@ -75,8 +75,8 @@ echo "Resultate für klaus von adder-2" http :8092/results/klaus | jq .[].sum | uniq docker-compose stop adder-2 -while [[ "$(http :8091/results | jq -r '.[]|contains({peter})' | grep true)" != "true" ]]; do echo "Waiting for some results for peter to show up on adder-1..."; sleep 1; done -while [[ "$(http :8091/results | jq -r '.[]|contains({klaus})' | grep true)" != "true" ]]; do echo "Waiting for some results for klaus to show up on adder-1..."; sleep 1; done +until [ $(http --check-status :8091/results/peter 2> /dev/null) ]; do echo "Waiting for some results for peter to show up on adder-1..."; sleep 1; done +until [ $(http --check-status :8091/results/klaus 2> /dev/null) ]; do echo "Waiting for some results for klaus to show up on adder-1..."; sleep 1; done echo "Resultate für adder-1" http -v --pretty none -S :8091/results @@ -90,8 +90,8 @@ http :8091/results/klaus | jq .[].sum | uniq docker-compose kill -s 9 adder-1 docker-compose start adder-1 while ! [[ $(http 0:8091/actuator/health 2> /dev/null) =~ "UP" ]]; do echo "Waiting for adder-1..."; sleep 1; done -while [[ "$(http :8091/results | jq -r '.[]|contains({peter})' | grep true)" != "true" ]]; do echo "Waiting for some results for peter to show up on adder-1..."; sleep 1; done -while [[ "$(http :8091/results | jq -r '.[]|contains({klaus})' | grep true)" != "true" ]]; do echo "Waiting for some results for klaus to show up on adder-1..."; sleep 1; done +until [ $(http --check-status :8091/results/peter 2> /dev/null) ]; do echo "Waiting for some results for peter to show up on adder-1..."; sleep 1; done +until [ $(http --check-status :8091/results/klaus 2> /dev/null) ]; do echo "Waiting for some results for klaus to show up on adder-1..."; sleep 1; done echo "Resultate für adder-1" http -v --pretty none -S :8091/results -- 2.20.1