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_not_running "sensors_modules"
25 # Check if the service is already running?
26 if [ ! -f /var/lock/subsys/sensors ]; then
27 msg_starting "sensors daemon"
29 ${INTERVAL:+-i $INTERVAL} \
30 ${LOG_INTERVAL:+-l $LOG_INTERVAL} \
31 ${RRD_LOGFILE:+-r $RRD_LOGFILE} \
32 ${RRD_INTERVAL:+-t $RRD_INTERVAL} \
36 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/sensors
37 touch /var/lock/subsys/sensors
39 msg_already_running "sensors daemon"
44 if [ -f /var/lock/subsys/sensors ]; then
45 msg_stopping "sensors daemon"
47 rm -f /var/lock/subsys/sensors
49 msg_not_running "sensors daemon"
54 # See how we were called.
63 status sensors sensord
72 msg_usage "$0 {start|stop|restart|force-reload|status}"