summaryrefslogtreecommitdiff
path: root/sys-auth/elogind/files/elogind.init-r1
blob: 1cb5071c621eb550feb5ddd4bc37237cb8a13b19 (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
#!/sbin/openrc-run
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

depend() {
	need dbus

	# Make sure elogind is up before xdm starts any dm
	before xdm

	use logger
}

start() {
	ebegin "Starting elogind"

	start-stop-daemon --start --quiet \
		--pidfile "${ELOGIND_PIDFILE}" \
		--exec "${ELOGIND_EXEC}" -- --daemon
	eend $?
}

stop() {
	ebegin "Stopping elogind"
	start-stop-daemon --stop --quiet --pidfile "${ELOGIND_PIDFILE}"
	eend $?
}