]> git.pld-linux.org Git - packages/acpid.git/blame - acpid.init
*** empty log message ***
[packages/acpid.git] / acpid.init
CommitLineData
94f6e9a1
PG
1#!/bin/sh
2#
3# acpid Starts the acpi daemon
4#
5# chkconfig: 345 44 56
6# description: Listen and dispatch ACPI events from the kernel
7# processname: acpid
8#
9# pidfile: /var/run/acpid.pid
10
11# Source function library.
12. /etc/rc.d/init.d/functions
13
14# Configuration file.
15. /etc/sysconfig/acpid
16
94f6e9a1
PG
17
18RETVAL=0
19
20# See how we were called.
21case "$1" in
22 start)
23 # Start daemons.
24 if [ ! -f /var/lock/subsys/acpid ]; then
25 msg_starting acpid $PROGRAM_ARGS
26 daemon acpid
27 RETVAL=$?
28 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/acpid
29 else
30 msg_already_running acpid
31 fi
32 ;;
33 stop)
34 # Stop daemons.
35 if [ -f /var/lock/subsys/acpid ]; then
36 msg_stopping acpid
37 killproc acpid
38 rm -f /var/lock/subsys/acpid >/dev/null 2>&1
39 else
40 msg_not_running acpid
41 exit 1
42 fi
43 ;;
44 reload)
7c0b3eb3
PG
45 if [ -f /var/lock/subsys/acpid ]; then
46 msg_reloading acpid
47 killproc acpid -HUP
48 else
49 msg_not_running acpid
50 exit 1
51 fi
94f6e9a1
PG
52 ;;
53 restart)
54 $0 stop
55 $0 start
56 ;;
57 status)
58 status acpid
59 ;;
60 *)
61 msg_Usage "$0 {start|stop|restart|reload|status}"
62 exit 1
63esac
This page took 0.060806 seconds and 4 git commands to generate.