diff --git a/src/keycloak.sh b/src/keycloak.sh index 9bb6031..ab5d988 100644 --- a/src/keycloak.sh +++ b/src/keycloak.sh @@ -1,5 +1,5 @@ echo "Waiting for keycloak to fully start..." -while [ "$(curl --location --silent --output /dev/null -w "%{http_code}" --show-error ${KEYCLOAK_ADDRESS}:8080/auth)" != "200" ]; do sleep 1; done +while [ "$(curl --location --silent --output /dev/null -w "%{http_code}" --show-error ${KEYCLOAK_ADDRESS})" != "200" ]; do sleep 1; done echo "Keycloak has started!" echo "Obtaining token..." token=$(curl --silent --data "username=${KEYCLOAK_ADMIN}&password=${KEYCLOAK_ADMIN_PASSWORD}&grant_type=password&client_id=admin-cli" ${KEYCLOAK_ADDRESS}/realms/master/protocol/openid-connect/token)