updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / tpfand-no-hal / tpfand.DAEMON
blob9d16a7e52c4e17ed50307a4aa9ad66020507a575
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
7 case "$1" in
8 start) stat_busy "Starting ThinkPad fan control daemon"
9 /usr/sbin/tpfand &>/dev/null
10 if [ $? -gt 0 ]; then
11 stat_fail
12 else
13 stat_done
16 stop) stat_busy "Stopping ThinkPad fan control daemon"
17 PID=`cat /var/run/tpfand.pid`
18 kill $PID &>/dev/null
19 if [ $? -gt 0 ]; then
20 stat_fail
21 else
22 rm -f /var/run/tpfand.pid
23 stat_done
26 restart) stat_busy "Restarting ThinkPad fan control daemon"
27 $0 stop
28 $0 start
30 *) echo "Usage: /etc/init.d/tpfand {start|stop|restart}"
31 exit 2
33 esac
34 exit 0