stop-reportquery.sh 318 B

12345678910111213141516
  1. #!/bin/sh
  2. echo "Shutting down reportquery"
  3. pid_list="$(ps aux | grep ipfcst-reportquery | grep -v grep | awk '{print $2}')"
  4. if test -z $pid_list; then
  5. echo "reportquery is not running"
  6. else
  7. for pid in $pid_list; do
  8. if kill -0 "$pid" 2>/dev/null; then
  9. echo "kill pid $pid"
  10. kill -9 $pid
  11. fi
  12. done
  13. fi
  14. exit 0