DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Kill Tomcat By Spec Dir

09.23.2011
| 3232 views |
  • submit to reddit
        //Kill tomcat  by spec dir

#!/bin/sh
#kill tomcat pid
pidlist=`ps -ef|grep tomcat_foobar/conf | grep -v "grep"|awk '{print $2}'`
echo "tomcat Id list :$pidlist"
if [ "$pidlist" = "" ]
then
  echo "no tomcat pid alive"
else
  for pid in ${pidlist}
 {
   kill -9 $pid
 echo "KILL $pid:"
 echo "service stop success"
  }
fi
    

Comments

Snippets Manager replied on Wed, 2012/03/14 - 5:07am

Readers would always love this kind of content not only for its specificity but also for the informative material included in this post. ================================================================================ ibm certifications|| ibm certification|| ibm certification exams|| ibm certification exam||