Answers for "Tomcat Shutdown Script"

0

Tomcat Shutdown Script

#Finds the tomcat process id
ps aux | grep tomcat | grep JavaVirtualMachines | awk -F  " " '{print $2}' > tomcatProcessID

#Kills the process id returned from above mentioned command.
kill -9 `cat tomcatProcessID` && tput setaf 3 && echo "Tomcat killed Successfully" ;rm -rf tomcatProcessID

#Not a mandatory command.
#Used to show all the remaining processes with 'tomcat' keyword in it.
#To inform on the console that the tomcat (running ess or indexer) is killed.
ps aux | grep tomcat | grep -v grep | grep -v killtomcat
Posted by: Guest on July-03-2021

Browse Popular Code Answers by Language