tomcat/tomcat-9.0.wrapper
Troy Dawson 5cb8db1cc4 RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/tomcat#f60e452abe83bd7a39a5d2d676b4d9b4b325a83d
2020-10-15 12:56:41 -07: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