Over a million developers have joined DZone.

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
Topics:

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

{{ parent.tldr }}

{{ parent.urlSource.name }}