diff options
author | Sam Lawrance <lawrance@FreeBSD.org> | 2006-02-08 13:35:17 +0000 |
---|---|---|
committer | Sam Lawrance <lawrance@FreeBSD.org> | 2006-02-08 13:35:17 +0000 |
commit | b79dc1999f020ba33dd14202d58b662bcbcf2f29 (patch) | |
tree | 2e7a841a991eb5316e22149af05a0b38ea2b32f8 /www/jakarta-tomcat4/files | |
parent | 364f00f749267a373301c44f61266033e600e296 (diff) | |
download | ports-b79dc1999f020ba33dd14202d58b662bcbcf2f29.tar.gz ports-b79dc1999f020ba33dd14202d58b662bcbcf2f29.zip |
Notes
Diffstat (limited to 'www/jakarta-tomcat4/files')
-rw-r--r-- | www/jakarta-tomcat4/files/tomcat4.sh.in | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/www/jakarta-tomcat4/files/tomcat4.sh.in b/www/jakarta-tomcat4/files/tomcat4.sh.in index 105bcae155c7..96994d9519b3 100644 --- a/www/jakarta-tomcat4/files/tomcat4.sh.in +++ b/www/jakarta-tomcat4/files/tomcat4.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) |