cd /home/skymet/apache-tomcat-8.5.43/bin/
sh shutdown.sh
##################Kill_running_id#################
javaID=$(ps -ef | netstat -pltn | grep java | awk '{print $7}' | cut -d "/" -f1)
echo $javaID
#tomcatIDkill=$(ps -Af | grep "tomcat" | grep -v grep | awk '{print$2}' | xargs kill -9 )
##################Kill_tomcat_running_id#################
kill -9 $tomcatIDkill
sh startup.sh
Goto crontab :check every 15 mint
*/15 * * * * sh /root/it/private/geoserver_reset.sh
No comments:
Post a Comment