2004-07-21 21:43:16 +02:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
# PROVIDE: dbus
|
|
|
|
# REQUIRE: DAEMON
|
|
|
|
#
|
|
|
|
# Add the following lines to /etc/rc.conf to enable the D-BUS messaging system:
|
|
|
|
#
|
|
|
|
# dbus_enable="YES"
|
|
|
|
#
|
|
|
|
|
2006-10-31 10:35:00 +01:00
|
|
|
. %%RC_SUBR%%
|
2006-10-31 10:12:59 +01:00
|
|
|
. %%GNOME_SUBR%%
|
|
|
|
|
|
|
|
dbus_enable=${dbus_enable-${gnome_enable}}
|
2004-07-27 02:16:33 +02:00
|
|
|
dbus_flags=${dbus_flags-"--system"}
|
|
|
|
|
2004-07-21 21:43:16 +02:00
|
|
|
name=dbus
|
|
|
|
rcvar=`set_rcvar`
|
|
|
|
|
2005-04-02 23:06:37 +02:00
|
|
|
command="%%PREFIX%%/bin/dbus-daemon"
|
2006-04-28 03:37:06 +02:00
|
|
|
pidfile="/var/run/dbus/${name}.pid"
|
2004-07-21 21:43:16 +02:00
|
|
|
|
2006-06-10 21:03:48 +02:00
|
|
|
start_precmd="dbus_prestart"
|
|
|
|
stop_postcmd="dbus_poststop"
|
2004-07-22 07:41:15 +02:00
|
|
|
|
2006-06-10 21:03:48 +02:00
|
|
|
dbus_prestart()
|
|
|
|
{
|
|
|
|
mkdir -p $(dirname $pidfile)
|
|
|
|
}
|
|
|
|
|
|
|
|
dbus_poststop()
|
2004-07-22 07:41:15 +02:00
|
|
|
{
|
|
|
|
rm -f $pidfile
|
|
|
|
}
|
|
|
|
|
2004-07-21 21:43:16 +02:00
|
|
|
|
|
|
|
load_rc_config ${name}
|
|
|
|
run_rc_command "$1"
|