In the following bash shell script until loop is not working properly.
cm_health_check=$(curl -X GET -u "admin:admin" http://$HOSTNAME:7180/api/v11/cm/service/ | jq '
.entityStatus')
echo $cm_health_check
until [ $cm_health_check -eq "GOOD_HEALTH" ]
do
cm_health_check=$(curl -X GET -u "admin:admin" http://$HOSTNAME:7180/api/v11/cm/service/ | jq '
.entityStatus')
done
output
+ curl -X GET -u admin:admin http://abcd.xyz.com:7180/api/v11/cm/service/
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 503 0 0 17023 0 --:--:-- --:--:-- --:--:-- 17344
"STARTING"
+ echo '"STARTING"'
+ [ '"STARTING"' -eq GOOD_HEALTH ]
until loop is not waiting for status to get GOOD_HEALTH , what am i doing wrong here?