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
24 # See how we were called.
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"
33 # Check if the service is already running?
34 if [ ! -f /var/lock/subsys/fancontrol ]; then
35 msg_starting fancontrol
38 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/fancontrol
40 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 if [ -f /var/lock/subsys/fancontrol ]; then
60 msg_reloading fancontrol
61 killproc fancontrol -HUP
64 msg_not_running fancontrol >&2
69 # if program allows reloading without stopping
86 msg_usage "$0 {start|stop|restart|reload|force-reload|status|init}"
92 # This must be last line !