Permalink
Browse files

Fix so we kill when pid is set.

Previously we would only kill when pid was unset and so it didn't work
  • Loading branch information...
1 parent 402725e commit 77064c188284aebb7249b75700d6b7f3535eae26 @buckett buckett committed Mar 12, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 prebuild.sh
View
@@ -9,8 +9,8 @@ if [ -d $CATALINA_HOME -a -f $CATALINA_PID ] ; then
fi
# See if we still have a pid associated with our AJP_PORT
- pid=$(netstat -telpW | grep :${AJP_PORT} | awk '{print $9;}' | sed 's@/.*@@')
- if [ -z "$pid" ]; then
+ pid=$(netstat -telpW | grep ":${AJP_PORT}" | awk '{print $9;}' | sed 's@/.*@@')
+ if [ -n "$pid" ]; then
echo Killing Tomcat with PID of $pid
kill -9 $pid
fi

0 comments on commit 77064c1

Please sign in to comment.