#!/bin/sh
tomcat_id=$(ps -ef | grep tomcat | grep -v "grep" | awk '{print $2}') for tomcatid in $tomcat_id do kill -9 ${tomcatid} echo "killed tomcat_id $tomcatid" done sh /data/4a/tomcat/bin/startup.sh echo "restart tomcat..."
#"--------4a--------"tomcat_id=$(ps -ef | grep tomcat | grep -v "grep" | awk '{print $2}')for tomcatid in $tomcat_iddo kill -9 ${tomcatid} echo "killed tomcat_id $tomcatid" donesh /data/4a/tomcat/bin/startup.shecho "restart tomcat..."