################start.sh########################
BASE_DIR=/export/home/radius/cleanfile/
CURRENT_DIR="$BASE_DIR"
RUN_DIR="$CURRENT_DIR/rundir"
LIB_DIR="$CURRENT_DIR/lib"
JVM_OPTS="-server -Xms64m -Xmx256m -Dsyn=cleanfile"
JAVA_HOME=/export/home/radius/jdk1.6.0_12/
LANG=zh_CN.UTF-8
CLASSPATH="$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/rt.jar:$JRE_HOME/charsets.jar"
MYCP="$MYCP:$LIB_DIR/cleanfile.jar"
MYCP="$MYCP:$LIB_DIR/log4j-1.2.15.jar"
MYCP="$MYCP:$LIB_DIR/slf4j-api-1.5.0.jar"
MYCP="$MYCP:$LIB_DIR/slf4j-log4j12-1.5.0.jar"
MYCP="$MYCP:$LIB_DIR/jakarta-oro.jar"
MYCP="$MYCP:$CURRENT_DIR/config/"
export JAVA_HOME
export CLASSPATH;
export LANG;
echo $MYCP
if [ ! -d "$RUN_DIR" ]; then
mkdir "$RUN_DIR"
fi
cd $RUN_DIR
nohup $JAVA_HOME/bin/java $JVM_OPTS -cp "$MYCP" com.poson.dacs.cleanfile.FileCleanner /dev/null 2>&1 &
echo $! > pidfile
################stop.sh########################
pid="`cat rundir/pidfile`";
kill $pid;
echo "kill scanplantimer done!"
posted on 2010-06-12 17:29
凌宇 阅读(599)
评论(0) 编辑 收藏