fix obex systemd service to support multiuser 74/25474/1
authorCorentin Lecouvey <corentin.lecouvey@open.eurogiciel.org>
Tue, 5 Aug 2014 14:46:44 +0000 (16:46 +0200)
committerCorentin Lecouvey <corentin.lecouvey@open.eurogiciel.org>
Tue, 5 Aug 2014 14:52:01 +0000 (16:52 +0200)
This allows to run an obexd daemon per user and set obex root directory
according to home user directory.

Bug-Tizen: TC-1436

Change-Id: I3c7c1da11269bd3d7ab2502e49a370e24588de3a
Signed-off-by: Corentin Lecouvey <corentin.lecouvey@open.eurogiciel.org>
obexd/src/obex.service.in

index 718ce74..b381be2 100644 (file)
@@ -4,7 +4,8 @@ Description=Bluetooth OBEX service
 [Service]
 Type=dbus
 BusName=org.bluez.obex
-ExecStart=/bin/sh -c 'if [ -z `ps ax | grep -v grep | grep obexd` ] ; then eval $(tzplatform-get TZ_USER_CONTENT); exec @libexecdir@/obexd -d --noplugin=syncevolution,pcsuite,irmc --symlinks -r $TZ_USER_CONTENT; fi'
+ExecStartPre=/bin/sh -c 'if [ ! -d $HOME/content ] ; then /bin/mkdir -p $HOME/content ; fi'
+ExecStart=/bin/sh -c 'if [ -z `ps ax | grep -v grep | grep obexd` ] ; then exec /lib/bluetooth/obexd -d --noplugin=syncevolution,pcsuite,irmc --symlinks --root=$HOME/content ; fi'
 
 [Install]
 Alias=dbus-org.bluez.obex.service