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