-
-
Save djraw/f378dc78d655c6b126c21b508b356a4b to your computer and use it in GitHub Desktop.
Example systemd unit file for tomcat 7.x
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Systemd unit file for tomcat | |
[Unit] | |
Description=Apache Tomcat Web Application Container | |
Wants=syslog.target network.target | |
After=syslog.target network.target | |
[Service] | |
Type=forking | |
Environment=JAVA_HOME=/usr/java/jre | |
Environment=CATALINA_PID=/run/tomcat.pid | |
Environment=CATALINA_HOME=/opt/tomcat | |
Environment=CATALINA_BASE=/opt/tomcat | |
Environment='CATALINA_OPTS=-Xms1G -Xmx1G -Djava.net.preferIPv4Stack=true' | |
Environment='JAVA_OPTS=-Djava.awt.headless=true' | |
ExecStart=/opt/tomcat/bin/startup.sh | |
ExecStop=/bin/kill -15 $MAINPID | |
PIDFile=/run/tomcat.pid | |
SuccessExitStatus=143 | |
User=tomcat | |
Group=tomcat | |
UMask=0007 | |
RestartSec=10 | |
Restart=always | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment