linux自动重启tomcat脚本分享

(编辑:jimmy 日期: 2024/12/26 浏览:2)

复制代码 代码如下:
#!/bin/bash
#
#chkconfig: 35 88 14
#description: tomcat auto start script
#script by okhelper
case "$1" in
start)
echo "Here is start script..."
JAVA_HOME=/usr/jdk1.6.0_13;
export JAVA_HOME
JRE_HOME=$JAVA_HOME/jre;
export JRE_HOME
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=./:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
date +"%Y-%m-%d %T:Starting tomcat..." /var/log/tomcat.log
/software/apache-tomcat-6.0.32/bin/startup.sh /var/log/tomcat.log
date +"%Y-%m-%d %T:tomcat started..." /var/log/tomcat.log
echo "--------------------------------------------" /var/log/tomcat.log

stop)
echo "Here is stop script..."
JAVA_HOME=/usr/jdk1.6.0_13;
export JAVA_HOME
JRE_HOME=$JAVA_HOME/jre;
export JRE_HOME
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=./:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
date +"%Y-%m-%d %T:stoping tomcat..." /var/log/tomcat.log
/software/apache-tomcat-6.0.32/bin/shutdown.sh /var/log/tomcat.log
date +"%Y-%m-%d %T:tomcat stoped..."  /var/log/tomcat.log
echo "--------------------------------------------" /var/log/tomcat.log

restart)
echo "Here is restart script..."
date +"%Y-%m-%d %T tomcat restart..." /var/log/tomcat.log
$0 stop
$0 start

*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac

一句话新闻

高通与谷歌联手!首款骁龙PC优化Chrome浏览器发布
高通和谷歌日前宣布,推出首次面向搭载骁龙的Windows PC的优化版Chrome浏览器。
在对骁龙X Elite参考设计的初步测试中,全新的Chrome浏览器在Speedometer 2.1基准测试中实现了显著的性能提升。
预计在2024年年中之前,搭载骁龙X Elite计算平台的PC将面世。该浏览器的提前问世,有助于骁龙PC问世就获得满血表现。
谷歌高级副总裁Hiroshi Lockheimer表示,此次与高通的合作将有助于确保Chrome用户在当前ARM兼容的PC上获得最佳的浏览体验。