tomcat stop batch script

cd / app / edms / autoscript custom storage path tomcat stop batch script
./stopAllService.sh stop batch script name

ps -ef|grep tomcat_7961|awk '{printf("kill -9 %s\n",$2)}' |sh

ps -ef|grep tomcat_7971|awk '{printf("kill -9 %s\n",$2)}' |sh

ps -ef|grep tomcat_7981|awk '{printf("kill -9 %s\n",$2)}' |sh

ps -ef|grep tomcat_7991|awk '{printf("kill -9 %s\n",$2)}' |sh

 

Kai batch script name to log in to clean up the cache cleanup tomcat work each start the service interval of 30 seconds before starting the next one
./startAllService.sh 

cd /app/domains/tomcat_7961_1
rm -rf logs/*
rm -rf work/*
./bin/startup.sh
sleep 30

cd /app/domains/tomcat_7971_1
rm -rf logs/*
rm -rf work/*
./bin/startup.sh
sleep 30

cd /app/domains/tomcat_7981_1
rm -rf logs/*
rm -rf work/*
./bin/startup.sh
sleep 30

cd /app/domains/tomcat_7991_1
rm -rf logs/*
rm -rf work/*
./bin/startup.sh

Batch 3 seconds tomcat work to clean up cached files every
./clearAllwork.sh 
cd / App / Domains / tomcat_7961_1
RM -rf Work / *
SLEEP 3

cd /app/domains/tomcat_7971_1
#rm -rf logs/*
rm -rf work/*
sleep 3

 

 Batch Cleanup tomcat tomcat work log and cache files every three seconds

./cleanAllcache.sh 

cd /app/domains/tomcat_7961_1
rm -rf logs/*
rm -rf work/*
sleep 3

cd /app/domains/tomcat_7971_1
rm -rf logs/*
rm -rf work/*
sleep 3

cd /app/domains/tomcat_7981_1
rm -rf logs/*
rm -rf work/*
sleep 3

cd /app/domains/tomcat_7991_1
rm -rf logs/*
rm -rf work/*
sleep 3

Guess you like

Origin www.cnblogs.com/eastward/p/12066040.html