add dbus support (implicitly disabled)

This commit is contained in:
Calin Crisan 2017-04-09 18:58:40 +03:00
parent f5af0bf967
commit c8fefeb445

View File

@ -0,0 +1,46 @@
#!/bin/bash
test -n "$os_version" || source /etc/init.d/base
start() {
mkdir -p /tmp/dbus
msg_begin "Starting dbus"
dbus-uuidgen --ensure
dbus-daemon --system
test $? == 0 && msg_done || msg_fail
}
stop() {
msg_begin "Stopping dbus"
udevadm control --stop-exec-queue
killall dbus-daemon &>/dev/null
test $? == 0 && msg_done || msg_fail
rm -f /var/run/messagebus.pid
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
exit $?