nosum-gateway.sh 561 B

1234567891011121314151617181920212223242526272829303132333435
  1. #! /bin/sh
  2. start(){
  3. exec java -Dnosum-gateway -jar nosum-gateway-v1-jar-with-dependencies.jar -XX:+UseG1GC >> /dev/null 2>&1 &
  4. exec ps -ef | grep nosum-gateway | grep -v "grep"
  5. }
  6. stop(){
  7. ps -ef | grep nosum-gateway| grep -v "grep" | cut -c 9-15 | xargs kill -9
  8. }
  9. status(){
  10. ps -ef | grep nosum-gateway | grep -v "grep"
  11. }
  12. logs(){
  13. tailf logs/nosum-gateway.log
  14. }
  15. case "$1" in
  16. start)
  17. start
  18. ;;
  19. stop)
  20. stop
  21. ;;
  22. status)
  23. status
  24. ;;
  25. logs)
  26. logs
  27. ;;
  28. *)
  29. printf 'Usage: %s {start|stop|status|logs}\n' "$prog"
  30. exit 1
  31. ;;
  32. esac