daemon daemon/dbus { need = system/initial system/mountfs system/bootmisc pid_file = /var/run/dbus/pid daemon { DAEMON=/usr/bin/dbus-daemon-1 NAME=dbus-1 DAEMONUSER=messagebus PIDDIR=/var/run/dbus PIDFILE=$PIDDIR/pid DESC="system message bus" EVENTDIR=/etc/dbus-1/event.d # Source defaults file; edit that file to configure this script. ENABLED=1 PARAMS="" if [ -e /etc/default/dbus-1 ]; then . /etc/default/dbus-1 fi test "$ENABLED" != "0" || exit 0 if [ ! -d $PIDDIR ]; then mkdir -p $PIDDIR chown $DAEMONUSER $PIDDIR chgrp $DAEMONUSER $PIDDIR fi if [ -e $PIDFILE ]; then PIDDIR=/proc/$(cat $PIDFILE) if [ -d ${PIDDIR} -a "$(readlink -f ${PIDDIR}/exe)" = "${DAEMON}" ]; then echo "$DESC already started; not starting." else echo "Removing stale PID file $PIDFILE." rm -f $PIDFILE fi fi start-stop-daemon --start --quiet --pidfile $PIDFILE \ --user $DAEMONUSER --exec $DAEMON -- --system $PARAMS if [ -d $EVENTDIR ]; then run-parts --arg=start $EVENTDIR fi } }