[Unit]
Description=JBoss EAP (domain mode)
After=syslog.target network.target
Before=httpd.service

[Service]
Environment=LAUNCH_JBOSS_IN_BACKGROUND=1
Environment="JAVA_HOME=/usr/lib/jvm/jre"

Environment="JBOSS_EAP_SH=/opt/eap/bin/domain.sh"
Environment="JBOSS_EAP_SERVER_CONFIG=domain.xml"
Environment="JBOSS_EAP_CONSOLE_LOG=/opt/eap/domain/log/systemd-console.log"
Environment="JBOSS_EAP_HOST_CONFIG="
Environment="JBOSS_EAP_BIND=0.0.0.0"
EnvironmentFile=-/etc/sysconfig/jboss-eap-domain.conf

User=jbosseap
Group=jbosseap
LimitNOFILE=102642
ExecStart=/bin/sh -c "/opt/eap/bin/systemd/launch.sh"
TimeoutSec=600

[Install]
WantedBy=multi-user.target
