stop.sh 207 B

1234567891011
  1. #!/bin/bash
  2. app=${name}-${version}.jar
  3. pid=`ps -ef|grep \$app|grep -v "grep"|awk '{print \$2}'`
  4. if [ -z \$pid ]
  5. then
  6. echo 'service not start!'
  7. else
  8. kill \$pid
  9. echo \$pid
  10. echo 'service is killed!'
  11. fi