]> git.pld-linux.org Git - packages/apmd.git/blame - apmd.init
- small PLD-fixes
[packages/apmd.git] / apmd.init
CommitLineData
21fdd835
JR
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
21fdd835
JR
10# Source function library.
11. /etc/rc.d/init.d/functions
12
07e7376a 13if [ ! -f /proc/apm ]; then
14 echo "No kernel APM support!"
15 exit 1
16fi
17
18CONFIG=/etc/sysconfig/apmd
19
21fdd835
JR
20# See how we were called.
21case "$1" in
22 start)
07e7376a 23 show "Starting up APM daemon: "
24 [ -r "$CONFIG" ] && . "$CONFIG"
21fdd835
JR
25 daemon /usr/sbin/apmd "$APMD_OPTIONS"
26 touch /var/lock/subsys/apmd
27 echo
28 ;;
29 stop)
07e7376a 30 show "Shutting down APM daemon: "
21fdd835
JR
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 *)
07e7376a 44 echo "Usage: apmd {start|stop|status|restart|reload}"
21fdd835
JR
45 exit 1
46esac
This page took 0.210822 seconds and 4 git commands to generate.