summaryrefslogtreecommitdiffstats
path: root/tomcat-named.service
diff options
context:
space:
mode:
authorPaul P. Komkoff <i@stingr.net>2013-06-11 21:35:03 +0400
committerPaul P. Komkoff <i@stingr.net>2013-06-11 21:35:03 +0400
commit0543334466f586650a6e86a34b779bf33d67f72f (patch)
tree71b22eca4f41874176e4edcad4499f04332203de /tomcat-named.service
parent004db978afd3078dcd39b2d237957010cb9cd0b8 (diff)
downloadtomcat-0543334466f586650a6e86a34b779bf33d67f72f.tar.gz
tomcat-0543334466f586650a6e86a34b779bf33d67f72f.tar.xz
tomcat-0543334466f586650a6e86a34b779bf33d67f72f.zip
Enable multiple instances on same installation.
This keeps the default tomcat.service unchanged (except for internals), and adds template for tomcat@name.service services. In the new world, if you need an instance, you'll create a directory /var/lib/tomcats/name, create {conf temp work webapps} in it, and then systemctl enable tomcat@name.service. This commit doesn't contain anything related to jsvc.
Diffstat (limited to 'tomcat-named.service')
-rw-r--r--tomcat-named.service18
1 files changed, 18 insertions, 0 deletions
diff --git a/tomcat-named.service b/tomcat-named.service
new file mode 100644
index 0000000..95f454f
--- /dev/null
+++ b/tomcat-named.service
@@ -0,0 +1,18 @@
+[Unit]
+Description=Apache Tomcat Web Application Container
+After=syslog.target network.target
+
+[Service]
+Type=simple
+EnvironmentFile=/etc/tomcat/tomcat.conf
+Environment="NAME=%I"
+EnvironmentFile=-/etc/sysconfig/tomcat@%I
+ExecStart=/usr/libexec/tomcat/server start
+ExecStop=/usr/libexec/tomcat/server stop
+SuccessExitStatus=143
+User=tomcat
+Group=tomcat
+
+[Install]
+WantedBy=multi-user.target
+