reset.sh 490 B

12345678910111213141516
  1. #!/bin/bash
  2. g
  3. PROCS="amplifierPower.pl audio.pl bias.pl color.pl debug.pl door.pl fan.pl garage.pl garage_leds.pl garage_shelf.pl leds.pl oil.pl overhead.pl projectorPower.pl rave.pl rifftrax.pl rope.pl frontApp stairs.pl announce.pl rumbleCtl.pl"
  4. # Find the PID for each named process
  5. PIDS=""
  6. for i in $PROCS; do
  7. PID="`ps -A -o pid=,command= | grep -v grep | grep ${i} | awk '{print $1}'`"
  8. PIDS="${PIDS} ${PID}"
  9. done
  10. # Kill everything we found
  11. kill $PIDS
  12. # Always exit cleanly
  13. exit 0