summaryrefslogtreecommitdiff
path: root/sys-auth/elogind/files/elogind.init
diff options
context:
space:
mode:
Diffstat (limited to 'sys-auth/elogind/files/elogind.init')
-rw-r--r--sys-auth/elogind/files/elogind.init25
1 files changed, 25 insertions, 0 deletions
diff --git a/sys-auth/elogind/files/elogind.init b/sys-auth/elogind/files/elogind.init
new file mode 100644
index 00000000..019c3afb
--- /dev/null
+++ b/sys-auth/elogind/files/elogind.init
@@ -0,0 +1,25 @@
+#!/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
+}
+
+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 $?
+}