deploy.sh 287 B

123456789101112
  1. #!/bin/bash
  2. # 本脚本的作用是停止当前Spring Boot应用,然后再次部署
  3. PID=$(ps -ef | grep litemall.jar | grep -v grep | awk '{ print $2 }')
  4. if [ ! -z "$PID" ]
  5. then
  6. kill $PID
  7. fi
  8. cd /home/ubuntu/deploy/litemall || exit 2
  9. nohup java -jar litemall.jar > log.log 2>&1 &