diff --git a/roles/keycloak/templates/keycloak-service.sh.j2 b/roles/keycloak/templates/keycloak-service.sh.j2 index 32aba1c..051af77 100755 --- a/roles/keycloak/templates/keycloak-service.sh.j2 +++ b/roles/keycloak/templates/keycloak-service.sh.j2 @@ -75,7 +75,7 @@ startKeycloak() { if [ "$(isKeyCloakRunning)" -eq 1 ]; then statusKeycloak else - ${KEYCLOAK_HOME}/bin/standalone.sh \ + JLAUNCH_JBOSS_IN_BACKGROUND=1 JBOSS_PIDFILE=${KEYCLOAK_PIDFILE} ${KEYCLOAK_HOME}/bin/standalone.sh \ -Djboss.bind.address=${KEYCLOAK_BIND_ADDRESS} \ -Djboss.http.port=${KEYCLOAK_HTTP_PORT} \ -Djboss.https.port=${KEYCLOAK_HTTPS_PORT} \ @@ -83,7 +83,6 @@ startKeycloak() { -Djboss.management.https.port=${KEYCLOAK_MANAGEMENT_HTTPS_PORT} \ -Djboss.node.name={{ inventory_hostname }} {% if ansible_facts.virtualization_type in ['docker','containerd'] %}-Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses=true {% endif %}\ 2>&1 >> "${KEYCLOAK_LOGFILE}" & - echo "${!}" > "${KEYCLOAK_PIDFILE}" fi } diff --git a/roles/keycloak/templates/keycloak.service.j2 b/roles/keycloak/templates/keycloak.service.j2 index a3aa846..a56acce 100644 --- a/roles/keycloak/templates/keycloak.service.j2 +++ b/roles/keycloak/templates/keycloak.service.j2 @@ -11,8 +11,8 @@ Group={{ keycloak_service_group }} PIDFile={{ keycloak_service_pidfile }} ExecStart={{ keycloak_dest }}/keycloak-service.sh start ExecStop={{ keycloak_dest }}/keycloak-service.sh stop -TimeoutStartSec=60 -TimeoutStopSec=60 +TimeoutStartSec=30 +TimeoutStopSec=30 LimitNOFILE=102642 [Install]