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
21 # Get service config - may override defaults
22 # [ -f /etc/sysconfig/fancontrol ] && . /etc/sysconfig/fancontrol
25 # Fancontrol needs to check system for pwm control
26 if [ ! -f /etc/sysconfig/fancontrol ]; then
27 nls "Fancontrol not initialized."
28 nls "Try \`%s init' before start." "$0"
31 # Check if the service is already running?
32 if [ ! -f /var/lock/subsys/fancontrol ]; then
33 msg_starting fancontrol
36 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/fancontrol
38 msg_already_running fancontrol
43 if [ -f /var/lock/subsys/fancontrol ]; then
45 msg_stopping fancontrol
47 rm -f /var/lock/subsys/fancontrol
49 msg_not_running fancontrol
58 # See how we were called.
70 if [ -f /var/lock/subsys/fancontrol ]; then
71 msg_reloading fancontrol
72 killproc fancontrol -HUP
75 msg_not_running fancontrol >&2
91 msg_usage "$0 {start|stop|restart|reload|force-reload|status|init}"
97 # This must be last line !