cbe921
# Systemd unit file for tomcat instances.
cbe921
# 
cbe921
# To create clones of this service:
cbe921
# 0. systemctl enable tomcat@name.service
cbe921
# 1. create catalina.base directory structure in
cbe921
#    /var/lib/tomcats/name
cbe921
# 2. profit.
cbe921
cbe921
[Unit]
cbe921
Description=Apache Tomcat Web Application Container
cbe921
After=syslog.target network.target
cbe921
cbe921
[Service]
cbe921
Type=simple
cbe921
EnvironmentFile=/etc/tomcat/tomcat.conf
cbe921
Environment="NAME=%i"
cbe921
EnvironmentFile=-/etc/sysconfig/tomcat@%i
cbe921
ExecStart=/usr/libexec/tomcat/server start
cbe921
ExecStop=/usr/libexec/tomcat/server stop
cbe921
SuccessExitStatus=143
cbe921
User=tomcat
cbe921
cbe921
[Install]
cbe921
WantedBy=multi-user.target