3 # sensors: Hardware sensors monitoring daemon
7 # chkconfig: 2345 32 68
8 # description: Starts and stops hardware sensors monitoring daemon.
9 # author: Filip Kalinski <filon@pld.org.pl>
11 # Source function library.
12 . /etc/rc.d/init.d/functions
15 if [ -f /etc/sysconfig/sensors ]; then
16 . /etc/sysconfig/sensors
20 if [ ! -f /var/lock/subsys/sensors_modules ]; then
21 msg_starting "sensors daemon"; fail
22 nls "sensors_modules services not started" >&2
26 # Check if the service is already running?
27 if [ ! -f /var/lock/subsys/sensors ]; then
28 msg_starting "sensors daemon"
30 $([ -n "$INTERVAL" ] && echo "-i $INTERVAL") \
31 $([ -n "$LOG_INTERVAL" ] && echo "-l $LOG_INTERVAL") \
32 $([ -n "$RRD_LOGFILE" ] && echo "-r $RRD_LOGFILE") \
33 $([ -n "$RRD_INTERVAL" ] && echo "-t $RRD_INTERVAL") \
37 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/sensors
38 touch /var/lock/subsys/sensors
40 msg_already_running "sensors daemon"
45 if [ -f /var/lock/subsys/sensors ]; then
46 msg_stopping "sensors daemon"
48 rm -f /var/lock/subsys/sensors
50 msg_not_running "sensors daemon"
55 # See how we were called.
64 status sensors sensord
73 msg_usage "$0 {start|stop|restart|force-reload|status}"