Blame SOURCES/tomcat-9.0.wrapper

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