aboutsummaryrefslogtreecommitdiffstats
path: root/www/tomcat41
diff options
context:
space:
mode:
authorlawrance <lawrance@FreeBSD.org>2006-02-08 21:35:17 +0800
committerlawrance <lawrance@FreeBSD.org>2006-02-08 21:35:17 +0800
commitbcf930033ce0716262f5629bdfc4ac74aa9bfce8 (patch)
treeadf1499191365b1606e327a0b51b229b538fb530 /www/tomcat41
parent8a733f18064a5b4c7fce40a8684d6f1a0af9f426 (diff)
downloadfreebsd-ports-gnome-bcf930033ce0716262f5629bdfc4ac74aa9bfce8.tar.gz
freebsd-ports-gnome-bcf930033ce0716262f5629bdfc4ac74aa9bfce8.tar.zst
freebsd-ports-gnome-bcf930033ce0716262f5629bdfc4ac74aa9bfce8.zip
- Make sure the rc script creates and chowns the PID file before running
'daemon'. No need for the port to create a PID file at install time (it would just be eaten by rc.d/cleanvar anyway). - Use 'ps -o comm' to grab a suitable procname. 'ps -o command' is not reliable enough. - Bump PORTREVISION since these changes fix broken rc script operation. Approved by: maintainer timeout (as part of previous update)
Diffstat (limited to 'www/tomcat41')
-rw-r--r--www/tomcat41/Makefile8
-rw-r--r--www/tomcat41/files/tomcat41.sh.in9
2 files changed, 9 insertions, 8 deletions
diff --git a/www/tomcat41/Makefile b/www/tomcat41/Makefile
index c099ddd51f16..fe86f12d5a93 100644
--- a/www/tomcat41/Makefile
+++ b/www/tomcat41/Makefile
@@ -7,7 +7,7 @@
PORTNAME= jakarta-tomcat
PORTVERSION= 4.1.31
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= www java
MASTER_SITES= ${MASTER_SITE_APACHE_JAKARTA}
MASTER_SITE_SUBDIR= tomcat-4/v${PORTVERSION}/bin
@@ -129,12 +129,6 @@ do-install:
@${CHMOD} 755 `${FIND} ${APP_HOME} -type d`
@${ECHO_MSG} " [ DONE ]"
- @${ECHO_MSG} -n ">> Creating PID file..."
- @${TOUCH} ${PID_FILE}
- @${CHOWN} ${TOMCAT_USER}:${TOMCAT_GROUP} ${PID_FILE}
- @${CHMOD} 0600 ${PID_FILE}
- @${ECHO_MSG} " [ DONE ]"
-
post-install:
@${ECHO_MSG} "${APP_TITLE} ${PORTVERSION} has been installed in ${APP_HOME}."
diff --git a/www/tomcat41/files/tomcat41.sh.in b/www/tomcat41/files/tomcat41.sh.in
index 105bcae155c7..96994d9519b3 100644
--- a/www/tomcat41/files/tomcat41.sh.in
+++ b/www/tomcat41/files/tomcat41.sh.in
@@ -109,7 +109,7 @@ log_args=">> ${tomcat%%TOMCAT_VERSION%%_stdout_log} \
if [ -f $pidfile ]; then
read rc_pid junk < $pidfile
if [ ! -z "$rc_pid" ]; then
- procname=`ps -o command= $rc_pid | cut -d ' ' -f 1`
+ procname=`ps -o comm= $rc_pid`
fi
fi
@@ -118,8 +118,15 @@ 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)