#!/usr/bin/bash

# author : renguangyin@yingu.com

current=$(cd `dirname $0`; pwd)

cd ${current}

ext_name="jar"
exec_file=$(ls ${current}/data/*.${ext_name} -lt | grep -v total | awk {'print $9'} | head -n 1)

if [[ "${exec_file}" == "" ]]; then
echo "file not found!"
echo ${current}/data/
exit 1
fi

echo "kill service if it is running!"

pids=$(ps -ef | grep ${current}/ | grep .${ext_name} | grep -v grep | awk {'print $2'})

if [ "$pids" = "" ]; then
echo "no kill !"
else
echo "kill with $pids"
kill -9 ${pids}
fi

echo ${exec_file}

nohup /web/jdk1.8.0_102/bin/java \
-Xms1024m -Xmx1024m \
-jar ${exec_file} --spring.config.location=/testwork/data/config/application.yml --logging.config=/testwork/data/config/logback.xml > /testwork/logs/nohup.out 2>&1 &

sleep 1

最新文章

  1. 建造者模式组装mybatis参数Example()
  2. correlation filters in object tracking
  3. C# 使用ffmpeg.exe进行音频转换完整demo-asp.net转换代码
  4. qau-国庆七天乐——A
  5. 误将文件push到Git,如何删除
  6. SVN版本更新后,upData工程之后,Xcode 工程文件打不开解决办法
  7. HashMap和Hashtable及HashSet的区别
  8. 使用WDS安装Windows8.1
  9. 彻底卸载MYSQL,windows版
  10. Java基础知识强化29:String类之String类构造方法
  11. trangleProble switch方法 java
  12. Ubuntu12.04下eclipse提示框黑色背景色的修改方法
  13. FAT下的winhex数据恢复
  14. Android studio怎么创建shape的XML文件
  15. Hibernate【与Spring整合】
  16. jQuery 选择器 prop() 和attr()
  17. Android WebKit 内核
  18. Redis(四)-持久化
  19. C# 获取结构体的所有成员
  20. [国家集训队] calc

热门文章

  1. rm(操作系统的删除文件)与git rm的区别
  2. java nio中,HeapByteBuffer与DirectByteBuffer的区别
  3. Alpha冲刺--总结随笔
  4. python之json、pickle模块
  5. Head First 设计模式 —— 03. 装饰器 (Decorator) 模式
  6. Lesson_strange_words1
  7. Docker-ce Centos8 笔记二:常见问题
  8. STM32 HAL库之串口详细篇
  9. 卷积神经网络学习笔记——Siamese networks(孪生神经网络)
  10. C++ 异常机制(上)