reset.sh 322 B

12345678910111213
  1. #!/bin/bash
  2. PROCS="rope.pl leds.pl bias.pl fan.pl overhead.pl projectorPower.pl amplifierPower.pl garage.pl"
  3. # Find the PID for each named process
  4. PIDS=""
  5. for i in $PROCS; do
  6. PID="`ps -A -o pid=,command= | grep -v grep | grep ${i} | awk '{print $1}'`"
  7. PIDS="${PIDS} ${PID}"
  8. done
  9. # Kill everything we found
  10. kill $PIDS