summaryrefslogtreecommitdiff
path: root/repo/system/acpid/acpid.initd
blob: c2d60f97a2158ed8946a53215c0969fb0f7f22c4 (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

description="The ACPI Daemon"

extra_started_commands="reload"
description_reload="Reload configuration"

command="/sbin/acpid"
command_args="--foreground ${command_args:-}"
command_background="yes"
pidfile="/run/$RC_SVCNAME.pid"

depend() {
	need dev localmount
	after hwdrivers modules
	provide acpid
	keyword -vserver -lxc
}

reload() {
	ebegin "Reloading $RC_SVCNAME configuration"
	if [ "$supervisor" ]; then
		$supervisor "$RC_SVCNAME" --signal HUP
	else
		start-stop-daemon --pidfile "$pidfile" --signal HUP
	fi
	eend $?
}