]> git.ipfire.org Git - ipfire-2.x.git/blob - src/initscripts/packages/messagebus
3ea80bc927fcd71c40c464ec6fcfab24c77cab1e
[ipfire-2.x.git] / src / initscripts / packages / messagebus
1 #!/bin/sh
2 # Begin $rc_base/init.d/messagebus
3
4 # Based on sysklogd script from LFS-3.1 and earlier.
5 # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
6
7 #$LastChangedBy: dnicholson $
8 #$Date: 2007-10-21 11:33:30 -0500 (Sun, 21 Oct 2007) $
9
10 . /etc/sysconfig/rc
11 . $rc_functions
12
13 pidfile=/var/run/dbus/pid
14 socket=/var/run/dbus/system_bus_socket
15
16 case "$1" in
17 start)
18 boot_mesg "Starting the D-Bus Messagebus Daemon..."
19 /usr/bin/dbus-uuidgen --ensure
20 loadproc -p "$pidfile" /usr/bin/dbus-daemon --system
21 ;;
22
23 stop)
24 boot_mesg "Stopping the D-Bus Messagebus Daemon..."
25 killproc -p "$pidfile" /usr/bin/dbus-daemon
26 [ $? -eq 0 ] && rm -f "$socket"
27 ;;
28
29 restart)
30 $0 stop
31 sleep 1
32 $0 start
33 ;;
34
35 reload)
36 boot_mesg "Reloading the D-Bus Messagebus Daemon..."
37 reloadproc /usr/bin/dbus-daemon
38 ;;
39
40 status)
41 statusproc -p $pidfile /usr/bin/dbus-daemon
42 ;;
43
44 *)
45 echo "Usage: $0 {start|stop|restart|status}"
46 exit 1
47 ;;
48 esac
49
50 # End $rc_base/init.d/messagebus