]> git.pld-linux.org Git - packages/apmd.git/blame - apmd.init
- removed unnecessary "echo"
[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
21fdd835
JR
27 ;;
28 stop)
07e7376a 29 show "Shutting down APM daemon: "
21fdd835
JR
30 killproc apmd
31 rm -f /var/lock/subsys/apmd
21fdd835
JR
32 ;;
33 status)
34 status apmd
35 ;;
36 restart|reload)
37 $0 stop
38 $0 start
39 ;;
40
41 *)
07e7376a 42 echo "Usage: apmd {start|stop|status|restart|reload}"
21fdd835
JR
43 exit 1
44esac
This page took 0.101419 seconds and 4 git commands to generate.