]> git.pld-linux.org Git - packages/apmd.git/blob - apmd.init
- updated to 3.0,
[packages/apmd.git] / apmd.init
1 #!/bin/sh
2 #
3 # chkconfig: 2345 05 92
4 # description: apmd is used for monitoring batery status and logging it via \
5 #       syslog(8). It can also be used for shutting down the machine when \
6 #       the battery is low.
7 # processname: apmd
8 # config: /etc/sysconfig/apmd
9
10 # Source function library.
11 . /etc/rc.d/init.d/functions
12
13 if [ ! -f /proc/apm ]; then  
14   echo "No kernel APM support!"
15   exit 1
16 fi
17
18 CONFIG=/etc/sysconfig/apmd
19
20 # See how we were called.
21 case "$1" in
22   start)
23         show "Starting up APM daemon: "
24         [ -r "$CONFIG" ] && . "$CONFIG"
25         daemon /usr/sbin/apmd "$APMD_OPTIONS"
26         touch /var/lock/subsys/apmd
27         echo
28         ;;
29   stop)
30         show "Shutting down APM daemon: "
31         killproc apmd
32         rm -f /var/lock/subsys/apmd
33         echo
34         ;;
35   status)
36         status apmd
37         ;;
38   restart|reload)
39         $0 stop
40         $0 start
41         ;;
42         
43   *)
44         echo "Usage: apmd {start|stop|status|restart|reload}"
45         exit 1
46 esac
This page took 0.072098 seconds and 3 git commands to generate.