community 517 B

1234567891011121314151617
  1. cd ~/App/community/
  2. git pull
  3. mvn clean compile flyway:migrate -Pproduction
  4. mvn clean compile -DskipTests package
  5. pid=$(ps aux | grep "community" | grep -v grep | awk '{print $2}')
  6. echo "kill -9 $pid"
  7. kill -9 $pid
  8. STATUS=$?
  9. if [ $STATUS -eq 0 ]
  10. then
  11. echo "Kill previous process successfully."
  12. echo "Begin restart community"
  13. nohup java -jar -Dspring.profiles.active=production target/community-0.0.1-SNAPSHOT.jar >/dev/null 2>&1 &
  14. echo "Community restart successfully."
  15. else
  16. echo "Kill previous process failed."
  17. fi