tomcat/tomcat-7.0.wrapper
Paul P. Komkoff 0543334466 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.
2013-06-11 21:35:03 +04:00

25 lines
564 B
Bash

#!/bin/bash
if [ "$1" = "version" ]; then
. /usr/libexec/tomcat/preamble
exec ${JAVACMD} -classpath ${CATALINA_HOME}/lib/catalina.jar \
org.apache.catalina.util.ServerInfo
fi
SRV="tomcat"
if [ -n "$2" ]; then
SRV="tomcat@$2"
fi
if [ "$1" = "start" ]; then
systemctl start ${SRV}.service
elif [ "$1" = "stop" ]; then
systemctl stop ${SRV}.service
elif [ "$1" = "version" ]; then
${JAVACMD} -classpath ${CATALINA_HOME}/lib/catalina.jar \
org.apache.catalina.util.ServerInfo
else
echo "Usage: $0 {start|stop|version} [server-id]"
exit 1
fi