smartMonitor.sh 245 B

123456789101112131415
  1. #!/bin/bash
  2. PROGS="smartPDU snmpd Qt_Test"
  3. while true; do
  4. sleep 5
  5. for n in $PROGS
  6. do
  7. if ! pgrep $n > /dev/null ; then
  8. echo "$n is not running, start it now ..."
  9. /etc/init.d/S90PDUApp start $n
  10. fi
  11. done
  12. done