运行服务接口,这里运行的是jetty做的接口
以下MyServer是主函数入口
NG=zh_CN.UTF-8 libs="."; for lib in `ls ../lib/*` do libs=$libs":"$lib done JAVA="/usr/bin/java -Xmx3g -Dfile.encoding=utf-8 -cp $libs " min=`date +%Y%m%d%H%M` pid=`ps aux | grep MyServer | awk '{if(index($0, "grep") == 0) print $2;}'` #kill -9 $pid num=`ps aux | grep MyServer | awk '{if(index($0, "grep") == 0) print $2;}'| wc -l` if [ $num -gt 0 ] then pid=`ps aux | grep MyServer | awk '{if(index($0, "grep") == 0) print $2;}'` kill -9 $pid fi nohup $JAVA com.server.MyServer ../conf/redis_server_conf.txt >Server.log 2>&1 & #JAVA Server.RServer ../conf/redis_server_conf.txt #nohup $JAVA Server.MyTextServer ../conf/conf.txt >server_$min".log" 2>&1 &