summaryrefslogtreecommitdiff
path: root/repo/dbus/dbus.initd
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-05-31 11:05:19 +0100
committerdavidovski <david@davidovski.xyz>2022-05-31 11:05:19 +0100
commit48ca75555522716f0f686dcae3dd6cf3d8ad714d (patch)
tree00c0f58550ba4661e87376f2f02c8001c69bae44 /repo/dbus/dbus.initd
parent871b2b573f01c1b3176a0f65458b3d281b41c437 (diff)
removed idea of repos
Diffstat (limited to 'repo/dbus/dbus.initd')
-rw-r--r--repo/dbus/dbus.initd33
1 files changed, 33 insertions, 0 deletions
diff --git a/repo/dbus/dbus.initd b/repo/dbus/dbus.initd
new file mode 100644
index 0000000..f3f44da
--- /dev/null
+++ b/repo/dbus/dbus.initd
@@ -0,0 +1,33 @@
+#!/sbin/openrc-run
+name="System Message Bus"
+description="D-Bus System Message Bus"
+
+extra_started_commands="reload"
+
+command="/usr/bin/dbus-daemon"
+command_args="--system --nofork --nopidfile --syslog-only ${command_args:-}"
+command_background="yes"
+pidfile="/run/$RC_SVCNAME.pid"
+
+depend() {
+ need localmount
+ after bootmisc
+}
+
+start_pre() {
+ checkpath -d -m755 -o root:messagebus /run/dbus || return 1
+
+ /usr/bin/dbus-uuidgen --ensure=/etc/machine-id
+}
+
+stop_post() {
+ [ ! -S /run/dbus/system_bus_socket ] || rm -f /run/dbus/system_bus_socket
+}
+
+reload() {
+ ebegin "Reloading $name configuration"
+ /usr/bin/dbus-send --print-reply --system --type=method_call \
+ --dest=org.freedesktop.DBus \
+ / org.freedesktop.DBus.ReloadConfig > /dev/null
+ eend $?
+}