北斗定位
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

31 lignes
1.2KB

  1. #!/bin/bash
  2. environment=$1
  3. version=$2
  4. echo "环境变量为${environment},版本为$version!"
  5. #processID='ps -ef | grep dipperposition | awk '{print $2}' | awk NR==1'
  6. ps -ef | grep dipperposition | awk '{print $2}' | xargs kill -9
  7. #echo $processID
  8. #if [[ "$processID" != "" ]]; then
  9. # kill -9 $processID
  10. #fi
  11. if [[ ${environment} == 'pro' ]]; then
  12. echo 'run in production environment'
  13. cd /home/data/dipperposition
  14. if [[ -f /home/linwl/dipperposition/dipperposition.jar ]]; then
  15. echo 'mv /home/linwl/dipperposition/dipperposition.jar to destination'
  16. mv /home/linwl/dipperposition/dipperposition.jar /home/data/dipperposition/dipperposition.jar
  17. fi
  18. nohup java -Xmx1024M -Xms1024M -Djava.security.egd=file:/dev/./urandom -Dio.netty.leakDetectionLevel=ADVANCED -jar dipperposition.jar --spring.profiles.active=pro &
  19. fi
  20. if [[ ${environment} == 'test' ]]; then
  21. cd /home/data/dipperposition
  22. if [[ -f /home/linwl/Work/DipperPosition/dipperposition.jar ]]; then
  23. mv /home/linwl/Work/DipperPosition/dipperposition.jar /home/data/dipperposition/dipperposition.jar
  24. fi
  25. nohup java -Xmx128M -Xms128M -Djava.security.egd=file:/dev/./urandom -Dio.netty.leakDetectionLevel=ADVANCED -jar dipperposition.jar --spring.profiles.active=test &
  26. fi