summaryrefslogtreecommitdiff
path: root/pcr/elogind/elogind.init
diff options
context:
space:
mode:
authorOmar Vega Ramos <ovruni@gnu.org.pe>2017-02-05 12:27:45 -0500
committerOmar Vega Ramos <ovruni@gnu.org.pe>2017-02-05 12:27:45 -0500
commit6f865f9e82240661b408a208943cb4688c59b3cb (patch)
treec5e5b9d832efa01ee9b7dd68364ad4bc8c77f461 /pcr/elogind/elogind.init
parentc8e5162dfe65e09cf8dd1472ac25d19ef60b1051 (diff)
downloadabslibre-6f865f9e82240661b408a208943cb4688c59b3cb.tar.gz
abslibre-6f865f9e82240661b408a208943cb4688c59b3cb.tar.bz2
abslibre-6f865f9e82240661b408a208943cb4688c59b3cb.zip
elogind-219.12-2: rebuild
Diffstat (limited to 'pcr/elogind/elogind.init')
-rw-r--r--pcr/elogind/elogind.init32
1 files changed, 32 insertions, 0 deletions
diff --git a/pcr/elogind/elogind.init b/pcr/elogind/elogind.init
new file mode 100644
index 000000000..65a28e9c7
--- /dev/null
+++ b/pcr/elogind/elogind.init
@@ -0,0 +1,32 @@
+#!/usr/bin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need dbus
+
+ # Make sure elogind is up before xdm starts any dm
+ before xdm
+}
+
+start() {
+ ebegin "Starting elogind"
+
+ # elogind needs a /run/systemd directory
+ if [[ ! -e /run/systemd ]]; then
+ mkdir -p /run/systemd
+ chmod 644 /run/systemd
+ fi
+
+ start-stop-daemon --start --quiet --background \
+ --make-pidfile --pidfile "${ELOGIND_PIDFILE}" \
+ --exec "${ELOGIND_EXEC}"
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping elogind"
+ start-stop-daemon --stop --quiet --pidfile "${ELOGIND_PIDFILE}"
+ eend $?
+}