stop.sh 352 B

12345678910111213141516
  1. #!/bin/sh
  2. APP_NAME=fuint-server
  3. tpid=`ps -ef|grep $APP_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
  4. if [ ${tpid} ]; then
  5. echo 'Stop Process...'
  6. kill -15 $tpid
  7. fi
  8. sleep 5
  9. tpid=`ps -ef|grep $APP_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
  10. if [ ${tpid} ]; then
  11. echo 'Kill Process!'
  12. kill -9 $tpid
  13. else
  14. echo 'Stop Success!'
  15. fi