dbus/rc.dbus

Wed, 25 Feb 2009 19:23:10 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 25 Feb 2009 19:23:10 +0100
changeset 115
ec005c58d27f
permissions
-rw-r--r--

Import new package specs for introduction into repository.
The purpose of these packages are for flash video manipulation,
something seemingly missing from the current mtasc, haxe, sswf,
swftools, and adobeflex packages.

michael@12 1 #!@l_prefix@/bin/openpkg rc
michael@12 2 ##
michael@12 3 ## rc.dbus -- Run-Commands
michael@12 4 ##
michael@12 5
michael@12 6 %config
michael@12 7 dbus_enable="$openpkg_rc_def"
michael@12 8 dbus_flags="--system --fork"
michael@12 9
michael@12 10 %common
michael@12 11 dbus_pidfile="@l_prefix@/var/dbus/run/dbus.pid"
michael@12 12 dbus_cfgfile="@l_prefix@/etc/dbus/system.conf"
michael@12 13 dbus_signal () {
michael@12 14 [ -f $dbus_pidfile ] && kill -$1 `cat $dbus_pidfile`
michael@12 15 }
michael@12 16
michael@12 17 %status -u @l_susr@ -o
michael@12 18 dbus_usable="unknown"
michael@12 19 dbus_active="no"
michael@12 20 rcService dbus enable yes && \
michael@12 21 dbus_signal 0 && dbus_active="yes"
michael@12 22 echo "dbus_enable=\"$dbus_enable\""
michael@12 23 echo "dbus_usable=\"$dbus_usable\""
michael@12 24 echo "dbus_active=\"$dbus_active\""
michael@12 25
michael@12 26 %start -u @l_susr@
michael@12 27 rcService dbus enable yes || exit 0
michael@12 28 rcService dbus active yes && exit 0
michael@12 29 @l_prefix@/lib/dbus/bin/dbus-daemon $dbus_flags >/dev/null 2>&1
michael@12 30
michael@12 31 %stop -u @l_susr@
michael@12 32 rcService dbus enable yes || exit 0
michael@12 33 rcService dbus active no && exit 0
michael@12 34 dbus_signal TERM
michael@12 35 sleep 2
michael@12 36 rm -f $dbus_pidfile 2>/dev/null || true
michael@12 37
michael@12 38 %restart -u @l_susr@
michael@12 39 rcService dbus enable yes || exit 0
michael@12 40 rcService dbus active no && exit 0
michael@12 41 rc dbus stop start
michael@12 42

mercurial