/rcS.d/S47lm-sensors

http://github.com/brinkman83/bashrc · Shell · 46 lines · 30 code · 6 blank · 10 comment · 3 complexity · 6d41433f50565eedb8696451dc3311b0 MD5 · raw file

  1. #!/bin/sh
  2. ### BEGIN INIT INFO
  3. # Provides: lm-sensors
  4. # Required-Start: $remote_fs
  5. # Required-Stop:
  6. # Default-Start: S
  7. # Default-Stop:
  8. # Short-Description: lm-sensors
  9. # Description: hardware health monitoring
  10. ### END INIT INFO
  11. . /lib/lsb/init-functions
  12. [ -f /etc/default/rcS ] && . /etc/default/rcS
  13. PATH=/bin:/usr/bin:/sbin:/usr/sbin
  14. PROGRAM=/usr/bin/sensors
  15. test -x $PROGRAM || exit 0
  16. case "$1" in
  17. start)
  18. log_begin_msg "Setting sensors limits"
  19. if [ "$VERBOSE" = "no" ]; then
  20. /usr/bin/sensors -s 1> /dev/null 2> /dev/null
  21. /usr/bin/sensors 1> /dev/null 2> /dev/null
  22. else
  23. /usr/bin/sensors -s
  24. /usr/bin/sensors > /dev/null
  25. fi
  26. log_end_msg 0
  27. ;;
  28. stop)
  29. ;;
  30. force-reload|restart)
  31. $0 start
  32. ;;
  33. status)
  34. exit 0
  35. ;;
  36. *)
  37. log_success_msg "Usage: /etc/init.d/sensors {start|stop|restart|force-reload|status}"
  38. exit 1
  39. esac
  40. exit 0