You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

15 lines
252 B

  1. #!/bin/bash
  2. DIR="$( cd "$( dirname "$0" )" && pwd )"
  3. FILES=$(find "$DIR" -name "*.pid" -type f);
  4. for pid_file in $FILES; do
  5. pid=$(cat "$pid_file")
  6. if [[ $pid ]]; then
  7. echo "Killing $pid_file with $pid"
  8. kill $pid
  9. fi
  10. done