diff options
author | davidovski <david@davidovski.xyz> | 2022-03-30 17:54:09 +0100 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2022-03-30 17:54:09 +0100 |
commit | de16da348671bd797500ab144ae56d23e88c7463 (patch) | |
tree | 728ec7d354049c977b34d9693109cd5683992a30 /extra/dbus | |
parent | 9ae31d6c582fbb636625a87d0921fd914f33c05e (diff) |
fixed initd files
Diffstat (limited to 'extra/dbus')
-rw-r--r-- | extra/dbus/dbus.confd | 7 | ||||
-rw-r--r-- | extra/dbus/dbus.initd | 33 | ||||
-rw-r--r-- | extra/dbus/dbus.trigger | 4 |
3 files changed, 44 insertions, 0 deletions
diff --git a/extra/dbus/dbus.confd b/extra/dbus/dbus.confd new file mode 100644 index 0000000..0454047 --- /dev/null +++ b/extra/dbus/dbus.confd @@ -0,0 +1,7 @@ +# Configuration for /etc/init.d/dbus + +# Additional arguments to pass to dbus-daemon. +#command_args= + +# Uncomment to use process supervisor. +#supervisor=supervise-daemon 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 $? +} diff --git a/extra/dbus/dbus.trigger b/extra/dbus/dbus.trigger new file mode 100644 index 0000000..a537bd8 --- /dev/null +++ b/extra/dbus/dbus.trigger @@ -0,0 +1,4 @@ +#!/bin/sh + +dbus-send --system --type=method_call --dest=org.freedesktop.DBus / \ + org.freedesktop.DBUS.ReloadConfig >/dev/null 2>&1 || : |