summaryrefslogtreecommitdiff
path: root/nonsystemd/dbus-openrc/80-dbus
diff options
context:
space:
mode:
authorDavid P <megver83@parabola.nu>2022-07-18 22:39:55 -0400
committerDavid P <megver83@parabola.nu>2022-07-18 22:39:55 -0400
commit905728e4e1fdc1db2d09a97e0b94ab7fb59b4369 (patch)
treee5906c71c837be74a4203400283bad0d6cb570b0 /nonsystemd/dbus-openrc/80-dbus
parent8eb5f4abcd65b72f6195c8b00511e8728b3a3d40 (diff)
downloadabslibre-905728e4e1fdc1db2d09a97e0b94ab7fb59b4369.tar.gz
abslibre-905728e4e1fdc1db2d09a97e0b94ab7fb59b4369.tar.bz2
abslibre-905728e4e1fdc1db2d09a97e0b94ab7fb59b4369.zip
addpkg: nonsystemd/dbus-openrc 20210418-2
Signed-off-by: David P <megver83@parabola.nu>
Diffstat (limited to 'nonsystemd/dbus-openrc/80-dbus')
-rw-r--r--nonsystemd/dbus-openrc/80-dbus12
1 files changed, 12 insertions, 0 deletions
diff --git a/nonsystemd/dbus-openrc/80-dbus b/nonsystemd/dbus-openrc/80-dbus
new file mode 100644
index 000000000..81f830e3a
--- /dev/null
+++ b/nonsystemd/dbus-openrc/80-dbus
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# launches a session dbus instance
+
+dbuslaunch="$(which dbus-launch 2>/dev/null)"
+if [ -n "$dbuslaunch" ] && [ -x "$dbuslaunch" ] && [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
+ if [ -n "$command" ]; then
+ command="$dbuslaunch --exit-with-session $command"
+ else
+ eval $($dbuslaunch --sh-syntax --exit-with-session)
+ fi
+fi