1
0

stop.sh 260 B

1234567891011121314
  1. #!/usr/bin/env 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