Description of problem: Calling "/etc/init.d/tomcat5 status" does not work if the user running a second tomcat instance has a name different to "tomcat". Version-Release number of selected component (if applicable): Server version: Apache Tomcat/5.5.23 Server built: Aug 22 2008 12:27:59 Server number: 5.5.23.0 How reproducible: Steps to Reproduce: 1. Create a second tomcat5 instance with a own start/stop script, e.g. /etc/init.d/tomcat5app 2. Set TOMCAT_USER for the second instant to a different user than "tomcat" 2. start tomcat5app 3. get its state with "/etc/init.d/tomcat5app status" Actual results: /etc/init.d/tomcat5app running (14464) but no PID file exists Expected results: /etc/init.d/tomcat5app is already running (14464) Additional info: The problem is in the script /etc/init.d/tomcat5 in function status() in the line pid="$(pgrep -u tomcat java)" which should be something like this pid="$(pgrep -u $TOMCAT_USER java)"
Including this in LSB compliance work on init scripts
Works in tomcat5-5.5.23-0jpp.37.el5.