#!/bin/sh
# 获取当前日期
current_date=$(date +%Y-%m-%d)
# 0. 关闭程序
kill -9 `ps -ef|grep java | grep leaf-business-zyyk-flow | awk '{print \$2}'` > /dev/null 2>&1
# 删除创建日期在10天前的日志文件
find ./logs -name "leaf-business-zyyk-flow*.log" -type f -mtime +10 -exec rm -f {} \;
# 启动程序
nohup java -jar leaf-business-zyyk-flow.jar -Dspring.config.location=file:/home/leaf/leaf-business-zyyk-flow/config/application.yml >> ./logs/leaf-business-zyyk-flow-$current_date.log &