4
elif [ "$1" = "start" ] ; then
6
if [ ! -z "$CATALINA_PID" ]; then
7
- if [ -f "$CATALINA_PID" ]; then
8
+ if [ -s "$CATALINA_PID" ]; then
9
echo "PID file ($CATALINA_PID) found. Is Tomcat still running? Start aborted."
15
if [ ! -z "$CATALINA_PID" ]; then
16
- if [ -f "$CATALINA_PID" ]; then
17
+ if [ -s "$CATALINA_PID" ]; then
18
kill -0 `cat $CATALINA_PID` >/dev/null 2>&1
20
echo "PID file ($CATALINA_PID) found but no matching process was found. Stop aborted."
23
+ elif [ -f "$CATALINA_PID" ]; then
25
+ echo "\$CATALINA_PID was set ($CATALINA_PID) but the specified file is empty. Did Tomcat fail while starting? Stop aborted."
28
echo "\$CATALINA_PID was set ($CATALINA_PID) but the specified file does not exist. Is Tomcat running? Stop aborted."