opt/dbus/rc.dbus
2007-10-26 08:18:10 -05:00

29 lines
402 B
Bash

#!/bin/sh
#
# /etc/rc.d/dbus: start/stop dbus messagebus daemon
#
case $1 in
start)
if [ ! -f /var/lib/dbus/machine-id ]
then
/usr/bin/dbus-uuidgen --ensure
fi
/usr/sbin/dbus-daemon --system
;;
stop)
killall -q /usr/sbin/dbus-daemon
rm -f /var/run/dbus/dbus.pid
;;
restart)
$0 stop
sleep 2
$0 start
;;
*)
echo "Usage: $0 [start|stop|restart]"
;;
esac
# End of file