Created
March 18, 2015 08:15
-
-
Save ai212983/c646b0a46e4a009d18c8 to your computer and use it in GitHub Desktop.
Killing Tomcat 6 instance by grepping process with its home directory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PID=`ps ux | grep -v grep | grep -F -- "-Dcatalina.home=$CATALINA_HOME" | awk '{print $2}'` | |
echo "Killing Tomcat with the PID: $PID, using \$CATALINA_HOME: '$CATALINA_HOME'" | |
kill -9 $PID |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Pretty useful when running multiple Tomcat instances on same machine, so using CATALINA_PID won't work