diff --git a/services/ir/healthcheck.sh b/services/ir/healthcheck.sh index 7cbf015..8eed37b 100755 --- a/services/ir/healthcheck.sh +++ b/services/ir/healthcheck.sh @@ -1,6 +1,13 @@ #!/bin/sh -/neofs-cli control healthcheck -c /cli-cfg.yml \ - --endpoint "$NEOFS_IR_CONTROL_GRPC_ENDPOINT" \ - --ir | - grep "Health status: READY" +out=$(/neofs-cli control healthcheck -c /cli-cfg.yml \ + --endpoint "$NEOFS_IR_CONTROL_GRPC_ENDPOINT" \ + --ir) + +echo "$out" + +if [[ "$out" == *"Health status: READY"* ]]; then + exit 0 +else + exit 1 +fi diff --git a/services/storage/healthcheck.sh b/services/storage/healthcheck.sh index fdbf390..bb3d0cb 100755 --- a/services/storage/healthcheck.sh +++ b/services/storage/healthcheck.sh @@ -1,5 +1,12 @@ #!/bin/sh -/neofs-cli control healthcheck -c /cli-cfg.yml \ - --endpoint "$NEOFS_CONTROL_GRPC_ENDPOINT" | - grep "Health status: READY" +out=$(/neofs-cli control healthcheck -c /cli-cfg.yml \ + --endpoint "$NEOFS_CONTROL_GRPC_ENDPOINT") + +echo "$out" + +if [[ "$out" == *"Health status: READY"* ]]; then + exit 0 +else + exit 1 +fi