#!/bin/bash
export JAVA_HOME=/usr/local/java
export PATH=$PATH:/usr/local/java/bin
export CLASSPATH=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/jre/lib/rt.jar
TOMCATID=$(ps -ef|grep /opt/apps/apache-tomcat-6.0.36 |grep -v "grep" |awk '{print $2}')
TOMCATlujin="/opt/apps/apache-tomcat-6.0.36"
kill -9 $TOMCATID
/bin/bash $TOMCATlujin/bin/startup.sh
遇到的问题L:
发现手动重启脚本没问题,计划任务启动脚本乱码,环境变量有问题
在/bin/catalina.sh 最开始添加
export CATALINA_OPTS=-Dfile.encoding=UTF-8
本文转自 穿越防火墙 51CTO博客,原文链接:http://blog.51cto.com/sjitwant/1701087