5
# chkconfig: 2345 90 01
6
# description: start/stop fancontrol
7
# pidfile: /var/run/fancontrol.pid
10
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
13
# Source function library.
14
. /etc/rc.d/init.d/functions
16
FANCONTROL="/usr/local/sbin/fancontrol"
17
PIDFILE="/var/run/fancontrol.pid"
23
echo -n "Starting fancontrol daemon"
26
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/fancontrol
32
echo -n "Stopping fancontrol daemon"
35
rm -f /var/lock/subsys/fancontrol
41
if [ -f $PIDFILE ] ; then
44
echo -n "$FANCONTROL does not appear to be running"
49
if [ -n "$pid" ] ; then
50
ps -p $pid > /dev/null
52
echo -n "$FANCONTROL appears to be running"
54
echo -n "$FANCONTROL does not appear to be running"
62
[ -e /var/lock/subsys/fancontrol ] && restart || :
65
if [ ! -x $FANCONTROL ] ; then
66
echo "Cannot run $FANCONTROL"
93
echo "Usage: /etc/init.d/fancontrol
94
{start|stop|status|restart|condrestart}"