启用 vi start.sh

#!/bin/sh
# ##################################################################
# Powered by Ironfo
# ##################################################################
java -jar /usr/local/tomcat/lryhis/air-adapter-lryhis-0.0.1-SNAPSHOT-jar-with-dependencies.jar & 
#注意:必须有&让其后台执行,否则没有pid生成
echo $! > /usr/local/tomcat/lryhis/lryhis.pid # 将jar包启动对应的pid写入文件中,为停止时提供pid

停止 stop.sh

#!/bin/sh
# ##################################################################
#             Powered by Ironfo
# ##################################################################
#!/bin/sh
PID=$(cat /usr/local/tomcat/lryhis/lryhis.pid)
kill -9 $PID

 

相关文章:

  • 2021-09-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-13
  • 2022-01-30
猜你喜欢
  • 2022-12-23
  • 2021-09-24
  • 2021-12-07
  • 2021-05-20
  • 2022-12-23
相关资源
相似解决方案