36 lines
1.1 KiB
SYSTEMD
36 lines
1.1 KiB
SYSTEMD
|
[Unit]
|
||
|
Description=Tomcat 7 servlet container
|
||
|
After=network.target
|
||
|
|
||
|
[Service]
|
||
|
Type=forking
|
||
|
PIDFile=/var/run/tomcat7.pid
|
||
|
Environment=CATALINA_PID=/var/run/tomcat7.pid
|
||
|
Environment=TOMCAT_JAVA_HOME=/usr/lib/jvm/default-runtime
|
||
|
Environment=CATALINA_HOME=/usr/share/tomcat7
|
||
|
Environment=CATALINA_BASE=/usr/share/tomcat7
|
||
|
Environment=CATALINA_OPTS=
|
||
|
Environment=ERRFILE=SYSLOG
|
||
|
Environment=OUTFILE=SYSLOG
|
||
|
|
||
|
ExecStart=/usr/bin/jsvc \
|
||
|
-Dcatalina.home=${CATALINA_HOME} \
|
||
|
-Dcatalina.base=${CATALINA_BASE} \
|
||
|
-Djava.io.tmpdir=/var/tmp/tomcat7/temp \
|
||
|
-cp /usr/share/java/commons-daemon.jar:/usr/share/java/eclipse-ecj.jar:${CATALINA_HOME}/bin/bootstrap.jar:${CATALINA_HOME}/bin/tomcat-juli.jar \
|
||
|
-user tomcat7 \
|
||
|
-java-home ${TOMCAT_JAVA_HOME} \
|
||
|
-pidfile /var/run/tomcat7.pid \
|
||
|
-errfile ${ERRFILE} \
|
||
|
-outfile ${OUTFILE} \
|
||
|
$CATALINA_OPTS \
|
||
|
org.apache.catalina.startup.Bootstrap
|
||
|
|
||
|
ExecStop=/usr/bin/jsvc \
|
||
|
-pidfile /var/run/tomcat7.pid \
|
||
|
-stop \
|
||
|
org.apache.catalina.startup.Bootstrap
|
||
|
|
||
|
[Install]
|
||
|
WantedBy=multi-user.target
|