summaryrefslogtreecommitdiff
path: root/sys-apps/dbus/files/dbus.initd-r1
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-01-09 01:25:23 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-01-09 01:25:23 +0000
commitae92bf200ab037ae73cb22d4a78724b006c71b08 (patch)
treebc7e7643c32f5ab6c5cd4bc588247d908c99a4b6 /sys-apps/dbus/files/dbus.initd-r1
parente51474b1a0df70174e725a068f144e83832c7bdf (diff)
sys-apps/dbus : import from gentoo tree
Diffstat (limited to 'sys-apps/dbus/files/dbus.initd-r1')
-rw-r--r--sys-apps/dbus/files/dbus.initd-r136
1 files changed, 36 insertions, 0 deletions
diff --git a/sys-apps/dbus/files/dbus.initd-r1 b/sys-apps/dbus/files/dbus.initd-r1
new file mode 100644
index 00000000..bd354238
--- /dev/null
+++ b/sys-apps/dbus/files/dbus.initd-r1
@@ -0,0 +1,36 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+extra_started_commands="reload"
+
+description="An IPC message bus daemon"
+pidfile="/var/run/dbus.pid"
+command="/usr/bin/dbus-daemon"
+command_args="--system"
+
+dbus_socket="/var/run/dbus/system_bus_socket"
+
+depend() {
+ need localmount
+ after bootmisc
+}
+
+start_pre() {
+ /usr/bin/dbus-uuidgen --ensure=/etc/machine-id
+
+ # We need to test if /var/run/dbus exists, since script will fail if it does not
+ checkpath -q -d /var/run/dbus
+}
+
+stop_post() {
+ [ ! -S "${dbus_socket}" ] || rm -f "${dbus_socket}"
+}
+
+reload() {
+ ebegin "Reloading D-BUS messagebus config"
+ /usr/bin/dbus-send --print-reply --system --type=method_call \
+ --dest=org.freedesktop.DBus \
+ / org.freedesktop.DBus.ReloadConfig > /dev/null
+ eend $?
+}