#!/bin/sh # # messagebus: The D-BUS systemwide message bus # # description: This is a daemon which broadcasts notifications of system events \ # and other messages. See http://www.freedesktop.org/software/dbus/ # # processname: dbus-daemon # pidfile: /var/run/dbus/pid # This is a modified version of the rc.messagebus script distributed with the # dbus sources. Thanks to Don Tanner of the GWare Project # for most of the work involved --Robby Workman PIDFILE=/var/run/dbus/dbus.pid start() { echo "Starting system message bus..." if [ -x /usr/bin/dbus-uuidgen ] ; then /usr/bin/dbus-uuidgen --ensure fi if [ -x /usr/bin/dbus-daemon ];then /usr/bin/dbus-daemon --system 1>/dev/null 2>/dev/null fi } stop() { echo "Stopping system message bus..." if [ -e "$PIDFILE" ]; then pid=`cat $PIDFILE` kill $pid 1>/dev/null 2>/dev/null rm -f $PIDFILE else killall dbus-daemon 1>/dev/null 2>/dev/null fi } # See how we were called. case "$1" in start) start ;; stop) stop ;; restart) stop start ;; *) echo $"Usage: $0 {start|stop|restart}" ;; esac