3 # fancontrol fancontrol short service description
5 # chkconfig: 345 <start_level> <stop_level>
7 # description: fancontrol long service description
12 # - find out, if it should be dependant of sensors deamon
13 # - check this, case this is my first 'advanced' init script
14 # - register proper start and stop levels
18 # Source function library
19 . /etc/rc.d/init.d/functions
22 [ -f /etc/sysconfig/fancontrol ] && . /etc/sysconfig/fancontrol
25 # Check if the service is already running?
26 if [ ! -f /var/lock/subsys/fancontrol ]; then
27 # Fancontrol needs to check system for pwm control
28 if [ ! -f /etc/sysconfig/fancontrol ]; then
29 nls "Fancontrol not initialized."
30 nls "Try \`%s init' before start." "$0"
34 msg_starting fancontrol
37 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/fancontrol
39 msg_already_running fancontrol
44 if [ -f /var/lock/subsys/fancontrol ]; then
46 msg_stopping fancontrol
48 rm -f /var/lock/subsys/fancontrol
50 msg_not_running fancontrol
59 # See how we were called.
71 if [ -f /var/lock/subsys/fancontrol ]; then
72 msg_reloading fancontrol
73 killproc fancontrol -HUP
76 msg_not_running fancontrol
92 msg_usage "$0 {start|stop|restart|reload|force-reload|status|init}"
98 # This must be last line !