Skip to content

Instantly share code, notes, and snippets.

@gwaters
Created August 16, 2017 16:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gwaters/430ca52faa8096b28ff2c021e522693b to your computer and use it in GitHub Desktop.
Save gwaters/430ca52faa8096b28ff2c021e522693b to your computer and use it in GitHub Desktop.
tomcat
# Systemd unit file for 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
[Unit]
Description=Apache Tomcat Web Application Container
After=syslog.target network.target
[Service]
Type=simple
Environment="SERVICE_NAME=tomcat-dev"
EnvironmentFile=/etc/tomcat/tomcat.conf
EnvironmentFile=-/etc/sysconfig/tomcat-dev
ExecStart=/usr/libexec/tomcat/server start
ExecStop=/usr/libexec/tomcat/server stop
SuccessExitStatus=143
User=tomcat
Group=tomcat
[Install]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment