aboutsummaryrefslogtreecommitdiff
path: root/www/tomcat7
diff options
context:
space:
mode:
authorAlex Dupre <ale@FreeBSD.org>2010-03-01 15:36:47 +0000
committerAlex Dupre <ale@FreeBSD.org>2010-03-01 15:36:47 +0000
commitd0015165ef8d01e3ff6ffb4447fa68872d6ad382 (patch)
treec9628c15d2ee611842c77a2a48142c554ee7d54e /www/tomcat7
parent93617a1a1c4cf2c8a813890ea485c27e4f56a834 (diff)
downloadports-d0015165ef8d01e3ff6ffb4447fa68872d6ad382.tar.gz
ports-d0015165ef8d01e3ff6ffb4447fa68872d6ad382.zip
Notes
Diffstat (limited to 'www/tomcat7')
-rw-r--r--www/tomcat7/Makefile3
-rw-r--r--www/tomcat7/distinfo6
-rw-r--r--www/tomcat7/files/tomcat6.sh.in34
3 files changed, 30 insertions, 13 deletions
diff --git a/www/tomcat7/Makefile b/www/tomcat7/Makefile
index b4454658f4e6..8f96f98825b5 100644
--- a/www/tomcat7/Makefile
+++ b/www/tomcat7/Makefile
@@ -6,8 +6,7 @@
#
PORTNAME= tomcat
-PORTVERSION= 6.0.20
-PORTREVISION= 1
+PORTVERSION= 6.0.24
CATEGORIES= www java
MASTER_SITES= ${MASTER_SITE_APACHE}
MASTER_SITE_SUBDIR= tomcat/tomcat-6/v${PORTVERSION}/bin
diff --git a/www/tomcat7/distinfo b/www/tomcat7/distinfo
index 313dc61dc622..9e06e41cf8ce 100644
--- a/www/tomcat7/distinfo
+++ b/www/tomcat7/distinfo
@@ -1,3 +1,3 @@
-MD5 (apache-tomcat-6.0.20.tar.gz) = 5944999abe79d01dc2ee7776d9d57873
-SHA256 (apache-tomcat-6.0.20.tar.gz) = a443c1720dc25d0963dd47b299b4c5e81d51462147c351f18e5c59bf7646046e
-SIZE (apache-tomcat-6.0.20.tar.gz) = 5998298
+MD5 (apache-tomcat-6.0.24.tar.gz) = de8bec8e4eb87f00d588339f49ba7e83
+SHA256 (apache-tomcat-6.0.24.tar.gz) = 02a5efe773cc2d79e025f96e3aeb747f46d1dd262d0d9b848b84e60d319e6ff6
+SIZE (apache-tomcat-6.0.24.tar.gz) = 6104116
diff --git a/www/tomcat7/files/tomcat6.sh.in b/www/tomcat7/files/tomcat6.sh.in
index dc5670fb91be..f5cd4b61d675 100644
--- a/www/tomcat7/files/tomcat6.sh.in
+++ b/www/tomcat7/files/tomcat6.sh.in
@@ -74,7 +74,6 @@ tomcat%%TOMCAT_VERSION%%_stop_timeout="${tomcat%%TOMCAT_VERSION%%_stop_timeout:-
name="tomcat%%TOMCAT_VERSION%%"
rcvar=`set_rcvar`
pidfile="/var/run/%%APP_SHORTNAME%%.pid"
-procname="java"
load_rc_config "${name}"
@@ -94,6 +93,7 @@ if [ -n "${tomcat%%TOMCAT_VERSION%%_java_os}" ] ; then
export JAVA_OS="${tomcat%%TOMCAT_VERSION%%_java_os}"
fi
+java_class="org.apache.catalina.startup.Bootstrap"
java_command="%%LOCALBASE%%/bin/java \
${tomcat%%TOMCAT_VERSION%%_java_opts} \
-Djava.endorsed.dirs=%%TOMCAT_HOME%%/endorsed \
@@ -101,7 +101,7 @@ java_command="%%LOCALBASE%%/bin/java \
-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"
+ ${java_class}"
log_args=">> ${tomcat%%TOMCAT_VERSION%%_stdout_log} \
2>> ${tomcat%%TOMCAT_VERSION%%_stderr_log} "
@@ -111,17 +111,16 @@ 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"
+start_precmd="pid_touch"
+stop_cmd="tomcat_stop"
-pid_touch ()
-{
+pid_touch() {
touch $pidfile
chown $tomcat%%TOMCAT_VERSION%%_user $pidfile
}
-tomcat%%TOMCAT_VERSION%%_stop() {
- rc_pid=$(check_pidfile $pidfile $procname)
+tomcat_stop() {
+ rc_pid=$(tomcat_check_pidfile $pidfile)
if [ -z "$rc_pid" ]; then
[ -n "$rc_fast" ] && return 0
@@ -140,6 +139,25 @@ tomcat%%TOMCAT_VERSION%%_stop() {
rm -f ${pidfile}
}
+tomcat_check_pidfile() {
+ _pidfile=$1
+ if [ -z "$_pidfile" -o -z "$_procname" ]; then
+ err 3 'USAGE: check_pidfile pidfile procname [interpreter]'
+ fi
+ if [ ! -f $_pidfile ]; then
+ debug "pid file ($_pidfile): not readable."
+ return
+ fi
+ read _pid _junk < $_pidfile
+ if [ -z "$_pid" ]; then
+ debug "pid file ($_pidfile): no pid in file."
+ return
+ fi
+ if [ -n "`%%LOCALBASE%%/bin/jps -l | grep -e "^$_pid $java_class\$"`" ]; then
+ echo -n $_pid
+ fi
+}
+
tomcat_wait_max_for_pid() {
_timeout=$1
shift