配合 jekins—springboot脚本
#!/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
最新文章
- 建造者模式组装mybatis参数Example()
- correlation filters in object tracking
- C# 使用ffmpeg.exe进行音频转换完整demo-asp.net转换代码
- qau-国庆七天乐——A
- 误将文件push到Git,如何删除
- SVN版本更新后,upData工程之后,Xcode 工程文件打不开解决办法
- HashMap和Hashtable及HashSet的区别
- 使用WDS安装Windows8.1
- 彻底卸载MYSQL,windows版
- Java基础知识强化29:String类之String类构造方法
- trangleProble switch方法 java
- Ubuntu12.04下eclipse提示框黑色背景色的修改方法
- FAT下的winhex数据恢复
- Android studio怎么创建shape的XML文件
- Hibernate【与Spring整合】
- jQuery 选择器 prop() 和attr()
- Android WebKit 内核
- Redis(四)-持久化
- C# 获取结构体的所有成员
- [国家集训队] calc
热门文章
- rm(操作系统的删除文件)与git rm的区别
- java nio中,HeapByteBuffer与DirectByteBuffer的区别
- Alpha冲刺--总结随笔
- python之json、pickle模块
- Head First 设计模式 —— 03. 装饰器 (Decorator) 模式
- Lesson_strange_words1
- Docker-ce Centos8 笔记二:常见问题
- STM32 HAL库之串口详细篇
- 卷积神经网络学习笔记——Siamese networks(孪生神经网络)
- C++ 异常机制(上)