3 # messagebus The D-BUS systemwide message bus
7 # description: This is a daemon which broadcasts notifications of system
8 # events and other messages.
10 # pidfile: /var/run/dbus.pid
12 # Source function library
13 . /etc/rc.d/init.d/functions
16 . /etc/sysconfig/network
18 # Check that networking is up.
19 if is_yes "${NETWORKING}"; then
20 if [ ! -f /var/lock/subsys/network ]; then
21 # nls "ERROR: Networking is down. %s can't be run." messagebus
22 msg_network_down messagebus
30 # See how we were called.
33 # Check if the service is already running?
34 if [ ! -f /var/lock/subsys/messagebus ]; then
35 # show "Starting %s service" messagebus
36 msg_starting messagebus
37 daemon dbus-daemon-1 --system
39 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/messagebus
41 # show "%s service is already running." messagebus
42 msg_already_running messagebus
46 if [ -f /var/lock/subsys/messagebus ]; then
48 # show "Stopping %s service" messagebus
49 msg_stopping messagebus
50 killproc --pidfile dbus.pid
51 rm -f /var/lock/subsys/messagebus
52 rm -f /var/run/dbus.pid
54 # show "%s service is not running." messagebus
55 msg_not_running messagebus
64 if [ -f /var/lock/subsys/messagebus ]; then
65 # show "Reload %s service" messagebus
66 msg_reloading messagebus
67 killproc dbus-daemon-1 -HUP
70 # show "%s service is not running." messagebus
71 msg_not_running messagebus >&2
76 # if program allows reloading without stopping
89 # show "Usage: %s {start|stop|restart|reload|force-reload|status}"
90 msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
96 # This must be last line !
97 # vi:syntax=sh:tw=78:ts=8:sw=4