启动Spring boot服务脚本

#!/bin/bash
cd /test
java -jar test.jar &> ./test.log & 
echo "成功"

关闭Spring boot服务脚本

#!/bin/bash
APP_NAME="test.jar"
echo "stop SpringBoot Application"
pid=`ps -ef | grep $APP_NAME | grep -v grep | awk '{print $2}'`
if [ -n "$pid" ]
then
kill -9 $pid
fi

  

相关文章:

  • 2021-12-18
  • 2021-07-12
  • 2022-02-07
  • 2022-03-01
  • 2022-12-23
  • 2022-01-18
  • 2022-01-12
猜你喜欢
  • 2022-12-23
  • 2021-09-23
  • 2021-05-29
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案