mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-26 09:46:09 +00:00
- 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)
This commit is contained in:
parent
364f00f749
commit
b79dc1999f
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=155511
@ -7,7 +7,7 @@
|
||||
|
||||
PORTNAME= jakarta-tomcat
|
||||
PORTVERSION= 4.0.6
|
||||
PORTREVISION= 3
|
||||
PORTREVISION= 4
|
||||
CATEGORIES= www java
|
||||
MASTER_SITES= http://distfiles.coredump.cn/ \
|
||||
ftp://local-distfiles.freebsd.org.cn/pub/china-ports/liukang/
|
||||
@ -134,12 +134,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}."
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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}."
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
PORTNAME= jakarta-tomcat
|
||||
PORTVERSION= 5.0.30
|
||||
PORTREVISION= 2
|
||||
PORTREVISION= 3
|
||||
CATEGORIES= www java
|
||||
MASTER_SITES= ${MASTER_SITE_APACHE_JAKARTA}
|
||||
MASTER_SITE_SUBDIR= tomcat-5/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}."
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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}."
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
PORTNAME= tomcat
|
||||
PORTVERSION= 5.5.12
|
||||
PORTREVISION= 2
|
||||
PORTREVISION= 3
|
||||
CATEGORIES= www java
|
||||
MASTER_SITES= ${MASTER_SITE_APACHE_JAKARTA}
|
||||
MASTER_SITE_SUBDIR= tomcat-5/v${PORTVERSION}/bin
|
||||
@ -136,12 +136,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}."
|
||||
.include <bsd.port.post.mk>
|
||||
|
@ -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)
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
PORTNAME= tomcat
|
||||
PORTVERSION= 5.5.12
|
||||
PORTREVISION= 2
|
||||
PORTREVISION= 3
|
||||
CATEGORIES= www java
|
||||
MASTER_SITES= ${MASTER_SITE_APACHE_JAKARTA}
|
||||
MASTER_SITE_SUBDIR= tomcat-5/v${PORTVERSION}/bin
|
||||
@ -136,12 +136,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}."
|
||||
.include <bsd.port.post.mk>
|
||||
|
@ -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)
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
PORTNAME= tomcat
|
||||
PORTVERSION= 5.5.12
|
||||
PORTREVISION= 2
|
||||
PORTREVISION= 3
|
||||
CATEGORIES= www java
|
||||
MASTER_SITES= ${MASTER_SITE_APACHE_JAKARTA}
|
||||
MASTER_SITE_SUBDIR= tomcat-5/v${PORTVERSION}/bin
|
||||
@ -136,12 +136,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}."
|
||||
.include <bsd.port.post.mk>
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user