码迷,mamicode.com
首页 > 其他好文 > 详细

测试环境主机执行脚本

时间:2020-06-16 16:50:44      阅读:73      评论:0      收藏:0      [点我收藏+]

标签:环境   com   img   java   ogr   bash   nbsp   code   and   

#!/bin/bash
echo $USER
workhome=/lvnktest/dygaelasticsearch-service/
workjar=${workhome}dygaelasticsearch-service.jar
pid=`ps -ef|grep dygaelasticsearch-service.jar|grep -v ‘grep‘ | awk ‘{print $2}‘`
if [ -z $pid ];
  then echo "dygaelasticsearch-service is not running, so just to start it..."
else
  echo "dygaelasticsearch-service[pid=${pid}] is running, so i should kill the progress and restart it... "
  kill -9 $pid
fi
nohup java -jar ${workjar} > ${workhome}spring.log &
exit

 

 

 

技术图片

 

测试环境主机执行脚本

标签:环境   com   img   java   ogr   bash   nbsp   code   and   

原文地址:https://www.cnblogs.com/zgqbky/p/13141794.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!