summaryrefslogtreecommitdiff
path: root/www/tomcat6/files
diff options
context:
space:
mode:
Diffstat (limited to 'www/tomcat6/files')
-rw-r--r--www/tomcat6/files/patch-conf::server.xml35
-rw-r--r--www/tomcat6/files/pkg-deinstall.in47
-rw-r--r--www/tomcat6/files/pkg-install.in53
-rw-r--r--www/tomcat6/files/tomcat55.sh.in167
4 files changed, 0 insertions, 302 deletions
diff --git a/www/tomcat6/files/patch-conf::server.xml b/www/tomcat6/files/patch-conf::server.xml
deleted file mode 100644
index 1e1f67aed8f6..000000000000
--- a/www/tomcat6/files/patch-conf::server.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-$FreeBSD$
-
---- conf/server.xml.orig Sun Jun 5 21:37:27 2005
-+++ conf/server.xml Sun Jun 5 21:40:08 2005
-@@ -10,7 +10,7 @@
- define subcomponents such as "Valves" or "Loggers" at this level.
- -->
-
--<Server port="8005" shutdown="SHUTDOWN">
-+<Server port="%%SHUTDOWN_PORT%%" shutdown="SHUTDOWN">
-
- <!-- Comment these entries out to disable JMX MBeans support used for the
- administration web application -->
-@@ -72,8 +72,8 @@
- IP address of the remote client.
- -->
-
-- <!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
-- <Connector port="8080" maxHttpHeaderSize="8192"
-+ <!-- Define a non-SSL HTTP/1.1 Connector -->
-+ <Connector port="%%HTTP_PORT%%" maxHttpHeaderSize="8192"
- maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
- enableLookups="false" redirectPort="8443" acceptCount="100"
- connectionTimeout="20000" disableUploadTimeout="true" />
-@@ -97,8 +97,8 @@
- clientAuth="false" sslProtocol="TLS" />
- -->
-
-- <!-- Define an AJP 1.3 Connector on port 8009 -->
-- <Connector port="8009"
-+ <!-- Define an AJP 1.3 Connector -->
-+ <Connector port="%%AJP_1_3_PORT%%"
- enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />
-
- <!-- Define a Proxied HTTP/1.1 Connector on port 8082 -->
diff --git a/www/tomcat6/files/pkg-deinstall.in b/www/tomcat6/files/pkg-deinstall.in
deleted file mode 100644
index 655ee46519d3..000000000000
--- a/www/tomcat6/files/pkg-deinstall.in
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/bin/sh
-#
-# This script does the following.
-#
-# * Checks if the PID file exists. If it does, it kills the
-# process and removes the PID file.
-#
-# * Checks if the '%%USER%%' user exists. If it does, then it displays
-# a message.
-#
-# $FreeBSD$
-#
-
-USER=%%USER%%
-PID_FILE=%%PID_FILE%%
-
-# Make sure we're in the right stage of the process
-if [ "$2" = "DEINSTALL" ]; then
-
- # Kill the process if it is still running
- if [ -s ${PID_FILE} ]; then
- PID=`cat ${PID_FILE}`
- echo -n ">> Killing Tomcat process (${PID})..."
- /bin/kill ${PID} > /dev/null 2> /dev/null
- if [ $? -eq 0 ]; then
- echo " [ DONE ]"
- else
- echo " [ FAILED ]"
- fi
- echo -n ">> Removing PID file (${PID_FILE})..."
- rm ${PID_FILE} > /dev/null 2> /dev/null
- if [ $? -eq 0 ]; then
- echo " [ DONE ]"
- else
- echo " [ FAILED ]"
- fi
- fi
-fi
-
-if [ "$2" = "POST-DEINSTALL" ]; then
- # If the user exists, then display a message
- if pw usershow "${USER}" 2>/dev/null 1>&2; then
- echo "To delete the ${USER} user permanently, use 'pw userdel ${USER}'"
- fi
-fi
-
-exit 0
diff --git a/www/tomcat6/files/pkg-install.in b/www/tomcat6/files/pkg-install.in
deleted file mode 100644
index ddc5dfda878a..000000000000
--- a/www/tomcat6/files/pkg-install.in
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/bin/sh
-#
-# Checks if the '%%USER%%' user and '%%GROUP%%' group exist. If they don't, then
-# an attempt is made to create both.
-#
-# $FreeBSD$
-#
-
-# Make sure we're called during the 'make install' process
-if [ "$2" != "PRE-INSTALL" ]; then
- exit 0
-fi
-
-# Set some constants
-UID=80
-GID=${UID}
-USER=%%USER%%
-GROUP=%%GROUP%%
-
-# See if the group already exists
-if ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then
-
- # If not, try to create it
- if pw groupadd "${GROUP}" -g ${GID}; then
- echo "Added group \"${GROUP}\"."
- elif pw groupadd "${GROUP}"; then
- echo "Added group \"${GROUP}\"."
- else
- echo "Adding group \"${GROUP}\" failed..."
- exit 1
- fi
-fi
-
-# See if the user already exists
-if ! pw usershow "${USER}" 2>/dev/null 1>&2; then
-
- # If not, try to create it
- if pw useradd "${USER}" -u ${UID} -g "${GROUP}" -h - \
- -s "/sbin/nologin" -d "/nonexistent" \
- -c "World Wide Web Owner";
- then
- echo "Added user \"${USER}\"."
- elif pw useradd "${USER}" -g "${GROUP}" -h - \
- -s "/sbin/nologin" -d "/nonexistent" \
- -c "World Wide Web Owner";
- then
- echo "Added user \"${USER}\"."
- else
- echo "Adding user \"${USER}\" failed..."
- exit 1
- fi
-fi
-exit 0
diff --git a/www/tomcat6/files/tomcat55.sh.in b/www/tomcat6/files/tomcat55.sh.in
deleted file mode 100644
index 2823c81ca7d1..000000000000
--- a/www/tomcat6/files/tomcat55.sh.in
+++ /dev/null
@@ -1,167 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD$
-#
-
-# PROVIDE: tomcat%%TOMCAT_VERSION%%
-# REQUIRE: NETWORKING SERVERS
-# BEFORE: DAEMON
-# KEYWORD: shutdown
-
-#
-# Configuration settings for tomcat%%TOMCAT_VERSION%% in /etc/rc.conf:
-#
-# tomcat%%TOMCAT_VERSION%%_enable (bool):
-# Set to "NO" by default.
-# Set it to "YES" to enable tomcat%%TOMCAT_VERSION%%
-#
-# tomcat%%TOMCAT_VERSION%%_flags (str):
-# Set to "" by default.
-# Extra flags passed to start command
-#
-# tomcat%%TOMCAT_VERSION%%_catalina_home (str)
-# Set to "%%TOMCAT_HOME%%" by default.
-# Set the CATALINA_HOME variable for the Tomcat process
-#
-# tomcat%%TOMCAT_VERSION%%_catalina_base (str)
-# Set to "%%TOMCAT_HOME%%" by default.
-# Set the CATALINA_BASE variable for the Tomcat process
-#
-# tomcat%%TOMCAT_VERSION%%_catalina_tmpdir (str)
-# Set to "%%TOMCAT_HOME%%/temp" by default.
-# Set the CATALINA_TMPDIR variable for the Tomcat process
-#
-# tomcat%%TOMCAT_VERSION%%_stdout_log (str)
-# Set to "%%STDOUT_LOG%%" by default.
-# Set the location for the Tomcat process log (standard output)
-#
-# tomcat%%TOMCAT_VERSION%%_stderr_log (str)
-# Set to "%%STDERR_LOG%%" by default.
-# Set the location for the Tomcat process log (error output)
-#
-# tomcat%%TOMCAT_VERSION%%_stop_timeout (num)
-# Set to "10" by default.
-# Sets the timeout in seconds to allow tomcat to shutdown.
-# After the timeout has elapsed, tomcat will be killed.
-#
-# tomcat%%TOMCAT_VERSION%%_java_home (str):
-# tomcat%%TOMCAT_VERSION%%_java_vendor (str):
-# tomcat%%TOMCAT_VERSION%%_java_version (str):
-# tomcat%%TOMCAT_VERSION%%_java_os (str):
-# Specify the requirements of the Java VM to use. See javavm(1).
-#
-# tomcat%%TOMCAT_VERSION%%_classpath (str):
-# Set to "" by default.
-# Addtional classes to add to the CLASSPATH
-#
-# tomcat%%TOMCAT_VERSION%%_java_opts (str):
-# Set to "" by default.
-# Java VM args to use.
-#
-
-tomcat%%TOMCAT_VERSION%%_enable="${tomcat%%TOMCAT_VERSION%%_enable:-"NO"}"
-tomcat%%TOMCAT_VERSION%%_java_version="${tomcat%%TOMCAT_VERSION%%_java_version:-"%%JAVA_VERSION%%"}"
-tomcat%%TOMCAT_VERSION%%_user="${tomcat%%TOMCAT_VERSION%%_user:-"%%USER%%"}"
-tomcat%%TOMCAT_VERSION%%_catalina_home="${tomcat%%TOMCAT_VERSION%%_catalina_home:-"%%TOMCAT_HOME%%"}"
-tomcat%%TOMCAT_VERSION%%_catalina_base="${tomcat%%TOMCAT_VERSION%%_catalina_base:-"%%TOMCAT_HOME%%"}"
-tomcat%%TOMCAT_VERSION%%_catalina_tmpdir="${tomcat%%TOMCAT_VERSION%%_catalina_tmpdir:-"%%TOMCAT_HOME%%/temp"}"
-tomcat%%TOMCAT_VERSION%%_stdout_log="${tomcat%%TOMCAT_VERSION%%_stdout_log:-"%%STDOUT_LOG%%"}"
-tomcat%%TOMCAT_VERSION%%_stderr_log="${tomcat%%TOMCAT_VERSION%%_stderr_log:-"%%STDERR_LOG%%"}"
-tomcat%%TOMCAT_VERSION%%_stop_timeout="${tomcat%%TOMCAT_VERSION%%_stop_timeout:-"10"}"
-
-. %%RC_SUBR%%
-
-name="tomcat%%TOMCAT_VERSION%%"
-rcvar=`set_rcvar`
-pidfile="%%PID_FILE%%"
-
-load_rc_config "${name}"
-
-if [ -n "${tomcat%%TOMCAT_VERSION%%_java_home}" ] ; then
- export JAVA_HOME="${tomcat%%TOMCAT_VERSION%%_java_home}"
-fi
-
-if [ -n "${tomcat%%TOMCAT_VERSION%%_java_version}" ] ; then
- export JAVA_VERSION="${tomcat%%TOMCAT_VERSION%%_java_version}"
-fi
-
-if [ -n "${tomcat%%TOMCAT_VERSION%%_java_vendor}" ] ; then
- export JAVA_VENDOR="${tomcat%%TOMCAT_VERSION%%_java_vendor}"
-fi
-
-if [ -n "${tomcat%%TOMCAT_VERSION%%_java_os}" ] ; then
- export JAVA_OS="${tomcat%%TOMCAT_VERSION%%_java_os}"
-fi
-
-java_command="%%LOCALBASE%%/bin/java \
- ${tomcat%%TOMCAT_VERSION%%_java_opts} \
- -Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS \
- -classpath %%TOMCAT_HOME%%/%%JAR_FILE%%:%%TOMCAT_HOME%%/bin/commons-logging-api.jar:${tomcat%%TOMCAT_VERSION%%_classpath} \
- -Dcatalina.base=${tomcat%%TOMCAT_VERSION%%_catalina_base} \
- -Dcatalina.home=${tomcat%%TOMCAT_VERSION%%_catalina_home} \
- -Djava.io.tmpdir=${tomcat%%TOMCAT_VERSION%%_catalina_tmpdir} \
- org.apache.catalina.startup.Bootstrap"
-
-log_args=">> ${tomcat%%TOMCAT_VERSION%%_stdout_log} \
- 2>> ${tomcat%%TOMCAT_VERSION%%_stderr_log} "
-
-# Subvert the check_pid_file procname check.
-if [ -f $pidfile ]; then
- read rc_pid junk < $pidfile
- if [ ! -z "$rc_pid" ]; then
- procname=`ps -o comm= $rc_pid`
- fi
-fi
-
-required_files="${tomcat%%TOMCAT_VERSION%%_catalina_home}/conf/server.xml"
-
-command="/usr/sbin/daemon"
-flags="-p ${pidfile} ${java_command} start ${tomcat%%TOMCAT_VERSION%%_flags} ${log_args}"
-
-start_precmd=pid_touch
-stop_cmd="tomcat%%TOMCAT_VERSION%%_stop"
-
-pid_touch ()
-{
- touch $pidfile
- chown $tomcat%%TOMCAT_VERSION%%_user $pidfile
-}
-
-tomcat%%TOMCAT_VERSION%%_stop() {
- rc_pid=$(check_pidfile $pidfile $procname)
-
- if [ -z "$rc_pid" ]; then
- [ -n "$rc_fast" ] && return 0
- if [ -n "$pidfile" ]; then
- echo "${name} not running? (check $pidfile)."
- else
- echo "${name} not running?"
- fi
- return 1
- fi
-
- echo "Stopping ${name}."
- ${java_command} stop
- tomcat_wait_max_for_pid ${tomcat%%TOMCAT_VERSION%%_stop_timeout} ${rc_pid}
- kill -KILL ${rc_pid} 2> /dev/null && echo "Killed."
- echo -n > ${pidfile}
-}
-
-tomcat_wait_max_for_pid() {
- _timeout=$1
- shift
- _pid=$1
- _prefix=
- while [ $_timeout -gt 0 ] ; do
- echo -n ${_prefix:-"Waiting (max $_timeout secs) for PIDS: "}$_pid
- _prefix=", "
- sleep 2
- kill -0 $_pid 2> /dev/null || break
- _timeout=$(($_timeout-2))
- done
- if [ -n "$_prefix" ]; then
- echo "."
- fi
-}
-
-run_rc_command "$1"