summaryrefslogtreecommitdiff
blob: cce594a57df76a22a8250f446360c90f9b100d41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/sbin/openrc-run
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

depend() {
	need localmount
}

checkconfig() {
	if [ ! -e /proc/apm ] ; then
		eerror "APM support has not been compiled into the kernel"
		return 1
	fi
}

start() {
	checkconfig || return 1
	ebegin "Starting apmd"
	start-stop-daemon --start --quiet --pidfile /var/run/apmd.pid \
		--startas /usr/sbin/apmd -- ${APMD_OPTS}
	eend $?
}

stop() {
	ebegin "Stopping apmd"
	start-stop-daemon --stop --quiet --pidfile /var/run/apmd.pid
	eend $?
}