aboutsummaryrefslogtreecommitdiff
path: root/utils/dbus/files/dbus.init
diff options
context:
space:
mode:
authorFlorian Eckert <fe@dev.tdt.de>2021-12-10 12:16:01 +0100
committerFlorian Eckert <fe@dev.tdt.de>2021-12-13 09:54:26 +0100
commitfe96ad4f663b645f5660a4119bdcfbbf70ef40ba (patch)
tree9a480ea30dd0175a1a3a383a4c4c74b415eb7295 /utils/dbus/files/dbus.init
parent9fa04c296f97670f45a626ebc6a053f38a01bd3c (diff)
dbus: refactoring init for using procd
The dbus service has not yet been started via the procd. This commit changes this. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Diffstat (limited to 'utils/dbus/files/dbus.init')
-rw-r--r--utils/dbus/files/dbus.init25
1 files changed, 20 insertions, 5 deletions
diff --git a/utils/dbus/files/dbus.init b/utils/dbus/files/dbus.init
index afb70547c..949a38d16 100644
--- a/utils/dbus/files/dbus.init
+++ b/utils/dbus/files/dbus.init
@@ -3,15 +3,30 @@
START=60
-SERVICE_PID_FILE=/var/run/dbus.pid
+USE_PROCD=1
+PROG=/usr/bin/dbus-daemon
-start() {
+# To enable this makes only sense if the dbus has been compiled with
+# the option CONFIG_DBUS_VERBOSE=y
+
+#DEBUG=1
+
+start_service() {
mkdir -m 0755 -p /var/lib/dbus
mkdir -m 0755 -p /var/run/dbus
+
[ -x /usr/bin/dbus-uuidgen ] && /usr/bin/dbus-uuidgen --ensure
- service_start /usr/bin/dbus-daemon --system
+
+ procd_open_instance
+ procd_set_param command "${PROG}"
+ procd_append_param command --system
+ procd_append_param command --nofork
+ [ -n "$DEBUG" ] && procd_set_param env DBUS_VERBOSE=1
+ procd_set_param stdout 1
+ procd_set_param stderr 1
+ procd_close_instance
}
-stop() {
- service_stop /usr/bin/dbus-daemon
+stop_service() {
+ service_stop "${PROG}"
}