summaryrefslogtreecommitdiffstats
path: root/source/a/dbus/rc.messagebus
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2009-08-26 10:00:38 -0500
committer Eric Hameleers <alien@slackware.com>2018-05-31 22:41:17 +0200
commit5a12e7c134274dba706667107d10d231517d3e05 (patch)
tree55718d5acb710fde798d9f38d0bbaf594ed4b296 /source/a/dbus/rc.messagebus
downloadcurrent-5a12e7c134274dba706667107d10d231517d3e05.tar.gz
current-5a12e7c134274dba706667107d10d231517d3e05.tar.xz
Slackware 13.0slackware-13.0
Wed Aug 26 10:00:38 CDT 2009 Slackware 13.0 x86_64 is released as stable! Thanks to everyone who helped make this release possible -- see the RELEASE_NOTES for the credits. The ISOs are off to the replicator. This time it will be a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. We're taking pre-orders now at store.slackware.com. Please consider picking up a copy to help support the project. Once again, thanks to the entire Slackware community for all the help testing and fixing things and offering suggestions during this development cycle. As always, have fun and enjoy! -P.
Diffstat (limited to 'source/a/dbus/rc.messagebus')
-rw-r--r--source/a/dbus/rc.messagebus80
1 files changed, 80 insertions, 0 deletions
diff --git a/source/a/dbus/rc.messagebus b/source/a/dbus/rc.messagebus
new file mode 100644
index 000000000..7b27eb599
--- /dev/null
+++ b/source/a/dbus/rc.messagebus
@@ -0,0 +1,80 @@
+#!/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 <http://gware.org> Project
+# for most of the work involved --Robby Workman <rworkman@slackware.com>
+
+
+PIDFILE=/var/run/dbus/dbus.pid
+
+start() {
+ if ! ps axc | grep -w dbus-daemon ; then
+ rm -f $(dirname $PIDFILE)/*
+ if [ -x /usr/bin/dbus-uuidgen -a -x /usr/bin/dbus-daemon ] ; then
+ echo "Starting system message bus: /usr/bin/dbus-uuidgen --ensure ; /usr/bin/dbus-daemon --system"
+ /usr/bin/dbus-uuidgen --ensure
+ /usr/bin/dbus-daemon --system 1> /dev/null
+ fi
+ fi
+}
+
+stop() {
+ if [ -e "$PIDFILE" ]; then
+ echo "Stopping system message bus..."
+ pid=$(cat $PIDFILE)
+ kill $pid 1> /dev/null 2> /dev/null
+ # Just in case:
+ killall dbus-daemon 1> /dev/null 2> /dev/null
+ rm -f $PIDFILE
+ fi
+}
+
+reload() {
+ echo "Reloading system message bus configuration..."
+ if [ -e "$PIDFILE" ]; then
+ pid=$(cat $PIDFILE)
+ kill -HUP $pid
+ else
+ killall -HUP dbus-daemon
+ fi
+}
+
+status() {
+ if ps axc | grep -wq dbus-daemon 2>/dev/null ; then
+ echo "dbus-daemon is running."
+ else
+ echo "dbus is stopped."
+ fi
+}
+
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ stop
+ start
+ ;;
+ reload)
+ reload
+ ;;
+ status)
+ status
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|restart|reload|status}"
+ ;;
+esac
+