reset.sh 531 B

123456789101112131415
  1. #!/bin/bash
  2. PROCS="amplifierPower.pl audio.pl bias.pl color.pl comfort.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 shelf_high.pl stairs.pl announce.pl rumbleCtl.pl HDMIctrl.pl vr.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
  11. # Always exit cleanly
  12. exit 0