From de16da348671bd797500ab144ae56d23e88c7463 Mon Sep 17 00:00:00 2001 From: davidovski Date: Wed, 30 Mar 2022 17:54:09 +0100 Subject: fixed initd files --- extra/dbus/dbus.initd | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 extra/dbus/dbus.initd (limited to 'extra/dbus/dbus.initd') diff --git a/extra/dbus/dbus.initd b/extra/dbus/dbus.initd new file mode 100644 index 0000000..f3f44da --- /dev/null +++ b/extra/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 $? +} -- cgit v1.2.1