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