#!/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

 

 

 

测试环境主机执行脚本

 

相关文章:

  • 2021-08-23
  • 2021-12-06
  • 2022-12-23
  • 2021-12-24
  • 2021-06-26
  • 2021-06-03
猜你喜欢
  • 2021-10-07
  • 2022-12-23
  • 2022-02-15
  • 2022-02-07
  • 2022-12-23
  • 2022-12-23
  • 2022-01-01
相关资源
相似解决方案