mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-03 06:04:53 +00:00
- Update to 6.0.24 release [1]
- Fix rc.d stop script [2] PR: ports/144274 [1], ports/140015 [2] Submitted by: wen [1], Christer Solskogen <christer.solskogen@gmail.com> [2] Feature safe: yes
This commit is contained in:
parent
93617a1a1c
commit
d0015165ef
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=250460
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user