1. touch start.sh,内容如下:

#!/bin/bash

pid=`jps|grep jar`
echo $pid
for id in $pid
do
{
  kill -9 $id
  echo "kill $id"
  sleep 1
} &
done
sleep 1
echo "消灭了所有java线程..."
echo "准备启动应用"
nohup java -jar -Xmx10240m -Xms10240m -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9988 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false xx.jar &
tail -f nohup.out

2.授权

chmod u+x

 

相关文章:

  • 2021-10-17
  • 2021-12-05
  • 2021-10-07
  • 2021-06-03
  • 2021-09-28
  • 2021-12-03
  • 2022-01-21
猜你喜欢
  • 2021-06-27
  • 2021-12-01
  • 2021-10-30
  • 2021-07-07
  • 2022-12-23
  • 2022-12-23
  • 2021-12-15
相关资源
相似解决方案