dbus: add a rc.d script, create dbus user/group dbus for binpkgs.
--HG-- extra : convert_revision : 48ea6899a325893f2d5ca0f61159b37085e79a47
This commit is contained in:
27
templates/dbus/files/dbus
Normal file
27
templates/dbus/files/dbus
Normal file
@@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# PROVIDE: dbus
|
||||
# REQUIRE: DAEMON
|
||||
# KEYWORD: shutdown
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="dbus"
|
||||
rcvar=$name
|
||||
command="/usr/bin/dbus-daemon"
|
||||
command_args="--system"
|
||||
pidfile="/var/run/dbus/pid"
|
||||
start_precmd=dbus_prestart
|
||||
|
||||
dbus_prestart() {
|
||||
dir="/var/run/dbus"
|
||||
if [ ! -d $dir ]; then
|
||||
mkdir $dir
|
||||
chmod 0755 $dir
|
||||
chown dbus:dbus $dir
|
||||
fi
|
||||
/usr/bin/dbus-uuidgen --ensure
|
||||
}
|
||||
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
||||
Reference in New Issue
Block a user