diff options
Diffstat (limited to 'meta-oe/recipes-support/lm_sensors/lmsensors/fancontrol.init')
-rw-r--r-- | meta-oe/recipes-support/lm_sensors/lmsensors/fancontrol.init | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/lm_sensors/lmsensors/fancontrol.init b/meta-oe/recipes-support/lm_sensors/lmsensors/fancontrol.init new file mode 100644 index 000000000..4433020b3 --- /dev/null +++ b/meta-oe/recipes-support/lm_sensors/lmsensors/fancontrol.init | |||
@@ -0,0 +1,47 @@ | |||
1 | #!/bin/sh | ||
2 | ### BEGIN INIT INFO | ||
3 | # Provides: fancontrol | ||
4 | # Required-Start: $local_fs | ||
5 | # Should-Start: | ||
6 | # Required-Stop: $local_fs | ||
7 | # Should-Stop: | ||
8 | # Default-Start: 2 3 4 5 | ||
9 | # Default-Stop: 0 1 6 | ||
10 | # Short-Description: fancontrol initscript | ||
11 | # Description: Starts and controls the fancontrol daemon | ||
12 | ### END INIT INFO | ||
13 | |||
14 | PATH=/sbin:/usr/sbin:/bin:/usr/bin | ||
15 | |||
16 | DESC="fan control daemon" | ||
17 | NAME="fancontrol" | ||
18 | FANCONTROL=`which $NAME` | ||
19 | PIDFILE="/var/run/fancontrol.pid" | ||
20 | |||
21 | # Exit if the package is not installed | ||
22 | [ -x "$FANCONTROL" ] || exit 0 | ||
23 | |||
24 | case "$1" in | ||
25 | start) | ||
26 | echo -n "Starting $DESC: $NAME... " | ||
27 | start-stop-daemon -S -p $PIDFILE -b -x $FANCONTROL | ||
28 | echo "done." | ||
29 | ;; | ||
30 | stop) | ||
31 | echo -n "Stopping $DESC: $NAME... " | ||
32 | start-stop-daemon -K -p $PIDFILE | ||
33 | echo "done." | ||
34 | ;; | ||
35 | restart) | ||
36 | echo "Restarting $DESC: $NAME... " | ||
37 | $0 stop | ||
38 | $0 start | ||
39 | echo "done." | ||
40 | ;; | ||
41 | *) | ||
42 | echo "Usage: $0 {start|stop|restart}" | ||
43 | exit 1 | ||
44 | ;; | ||
45 | esac | ||
46 | |||
47 | exit 0 | ||