Blame SOURCES/tomcat-9.0.wrapper

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