trouble with dbus

Alfred Zastrow 4upstart at zastrow.at
Mon Apr 9 21:07:52 BST 2007


Hallo list,

what ist the right way to start the dbus-daemon (1.0.2) with upstart?
I tried a modified script from Alex, looking like this:

 > --------------- snipp  ---------------------
 > start on started udevtrigger
 >
 > stop on starting shutdown
 >
 > console output
 > service
 >
 > pre-start script
 >	if [ ! -d /var/run/dbus ]
 >	then
 >		mkdir /var/run/dbus
 >	fi
 >	chown messagebus:messagebus /var/run/dbus
 > end script
 >
 > exec /usr/bin/dbus-daemon --system
 >
 > post-stop script
 >	rm -f /var/run/dbus/pid
 >	rm -f /var/run/dbus/system_bus_socket
 > end script
 > --------------- snapp  --------------------

I tried with and without 'respawn' and with and without 'service' and 
I'm getting up to ten non-functional dbus-daemons (no pid and socket files)

This version seems to work, but I don't think that's the right way...


 > --------------- snipp  ---------------------
 > start on started udevtrigger
 >
 > stop on starting shutdown
 >
 > console output
 > service
 >
 > pre-start script
 >	if [ ! -d /var/run/dbus ]
 >	then
 >		mkdir /var/run/dbus
 >	fi
 >	chown messagebus:messagebus /var/run/dbus
 >	/usr/bin/dbus-daemon --system
 > end script
 >
 > post-stop script
 >	killall dbus-daemon
 >	rm -f /var/run/dbus/pid
 >	rm -f /var/run/dbus/system_bus_socket
 > end script
 > --------------- snapp  --------------------


Who can help?

regards
Alfred



More information about the upstart-devel mailing list