fi
if [ ! -z "$CATALINA_PID" ]; then
- if [ -s "$CATALINA_PID" ]; then
- if [ -f "$CATALINA_PID" ]; then
+ if [ -f "$CATALINA_PID" ]; then
+ if [ -s "$CATALINA_PID" ]; then
kill -0 `cat "$CATALINA_PID"` >/dev/null 2>&1
if [ $? -gt 0 ]; then
echo "PID file found but no matching process was found. Stop aborted."
exit 1
fi
else
- echo "\$CATALINA_PID was set but the specified file does not exist. Is Tomcat running? Stop aborted."
- exit 1
+ echo "PID file is empty and has been ignored."
fi
else
- echo "PID file is empty and has been ignored."
+ echo "\$CATALINA_PID was set but the specified file does not exist. Is Tomcat running? Stop aborted."
+ exit 1
fi
fi
<bug>46451</bug>: Configure svn:bugtraq properties for Tomcat trunk.
Based on a patch provided by Marc Guillemot. (markt)
</fix>
+ <fix>
+ <bug>51309</bug>: Correct logic in catalina.sh stop when using a PID
+ file to ensure the correct message is shown. Patch provided by Caio
+ Cezar. (markt)
+ </fix>
</changelog>
</subsection>
</section>