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
Kill Tomcat By Spec Dir
//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