Ви не можете вибрати більше 25 тем
Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
|
- #!/bin/bash
- environment=$1
- version=$2
- echo "环境变量为${environment},版本为$version!"
-
- #processID='ps -ef | grep dipperposition | awk '{print $2}' | awk NR==1'
- ps -ef | grep dipperposition | awk '{print $2}' | xargs kill -9
- #echo $processID
- #if [[ "$processID" != "" ]]; then
- # kill -9 $processID
- #fi
-
- if [[ ${environment} == 'pro' ]]; then
- echo 'run in production environment'
- cd /home/data/dipperposition
- if [[ -f /home/linwl/dipperposition/dipperposition.jar ]]; then
- echo 'mv /home/linwl/dipperposition/dipperposition.jar to destination'
- mv /home/linwl/dipperposition/dipperposition.jar /home/data/dipperposition/dipperposition.jar
- fi
-
- nohup java -Xmx1024M -Xms1024M -Djava.security.egd=file:/dev/./urandom -Dio.netty.leakDetectionLevel=ADVANCED -jar dipperposition.jar --spring.profiles.active=pro &
-
- fi
- if [[ ${environment} == 'test' ]]; then
- cd /home/data/dipperposition
- if [[ -f /home/linwl/Work/DipperPosition/dipperposition.jar ]]; then
- mv /home/linwl/Work/DipperPosition/dipperposition.jar /home/data/dipperposition/dipperposition.jar
- fi
- nohup java -Xmx128M -Xms128M -Djava.security.egd=file:/dev/./urandom -Dio.netty.leakDetectionLevel=ADVANCED -jar dipperposition.jar --spring.profiles.active=test &
- fi
|