Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Kill Tomcat By Spec Dir

DZone's Guide to

Kill Tomcat By Spec Dir

·
Free Resource
//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
Topics:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}