Blame SOURCES/tomcat-9.0.wrapper

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