From 935d478a7b7aca12019be19eedbefb065eb79e10 Mon Sep 17 00:00:00 2001 From: "Paul P. Komkoff" Date: Tue, 11 Jun 2013 21:56:51 +0400 Subject: ... --- tomcat-7.0.service | 16 ++++++++-------- tomcat-named.service | 8 ++++++++ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/tomcat-7.0.service b/tomcat-7.0.service index e2ab30c..103d464 100644 --- a/tomcat-7.0.service +++ b/tomcat-7.0.service @@ -1,19 +1,19 @@ -# Systemd unit file for tomcat +# Systemd unit file for default tomcat # # To create clones of this service: -# 1) By default SERVICE_NAME=tomcat. When cloned, the value must be defined -# before tomcat-sysd is called. -# 2) Create /etc/sysconfig/${SERVICE_NAME} from /etc/sysconfig/tomcat -# to override tomcat defaults +# DO NOTHING, use tomcat@.service instead. [Unit] Description=Apache Tomcat Web Application Container After=syslog.target network.target [Service] -Type=forking -ExecStart=/usr/sbin/tomcat-sysd start -ExecStop=/usr/sbin/tomcat-sysd stop +Type=simple +EnvironmentFile=/etc/tomcat/tomcat.conf +Environment="NAME=" +EnvironmentFile=-/etc/sysconfig/tomcat +ExecStart=/usr/libexec/tomcat/server start +ExecStop=/usr/libexec/tomcat/server stop SuccessExitStatus=143 User=tomcat Group=tomcat diff --git a/tomcat-named.service b/tomcat-named.service index 95f454f..9bbcb17 100644 --- a/tomcat-named.service +++ b/tomcat-named.service @@ -1,3 +1,11 @@ +# Systemd unit file for tomcat instances. +# +# To create clones of this service: +# 0. systemctl enable tomcat@name.service +# 1. create catalina.base directory structure in +# /var/lib/tomcats/name +# 2. profit. + [Unit] Description=Apache Tomcat Web Application Container After=syslog.target network.target -- cgit