Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

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
Source by serverfault.com #
 
PREVIOUS NEXT
Tagged: #Tomcat #Shutdown #Script
ADD COMMENT
Topic
Name
6+9 =