aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeon Anavi <leon.anavi@konsulko.com>2015-11-05 15:16:36 +0200
committerGerrit Code Review <gerrit@172.30.200.200>2015-11-07 00:01:57 +0000
commit6f0bdfc2c3d11cf18d149593a189c48a2a14e3d2 (patch)
tree3f45eee9a64f7950ee3d050e92a650e8e727017d
parent6e80fd4f6bdbd49a658ca07a15f0aabff9953dad (diff)
rygel: add systemd service
Change-Id: I30193ff62fdea97c2cd100a031c60458879d11c8 Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
-rw-r--r--meta-agl/recipes-connectivity/rygel/files/rygel.service13
-rw-r--r--meta-agl/recipes-connectivity/rygel/rygel_%.bbappend14
2 files changed, 27 insertions, 0 deletions
diff --git a/meta-agl/recipes-connectivity/rygel/files/rygel.service b/meta-agl/recipes-connectivity/rygel/files/rygel.service
new file mode 100644
index 000000000..95c701d04
--- /dev/null
+++ b/meta-agl/recipes-connectivity/rygel/files/rygel.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Rygel
+After=lightmediascanner.service
+Requires=lightmediascanner.service
+
+[Service]
+Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%U/dbus/user_bus_socket
+User=root
+ExecStartPre=/bin/sleep 3
+ExecStart=/usr/bin/dbus-launch --auto-syntax /usr/bin/rygel -c /etc/rygel.conf
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-agl/recipes-connectivity/rygel/rygel_%.bbappend b/meta-agl/recipes-connectivity/rygel/rygel_%.bbappend
index 9363c3cdc..7cfb9c063 100644
--- a/meta-agl/recipes-connectivity/rygel/rygel_%.bbappend
+++ b/meta-agl/recipes-connectivity/rygel/rygel_%.bbappend
@@ -5,4 +5,18 @@ PACKAGECONFIG[lms] = "--enable-lms-plugin,--disable-lms-plugin,sqlite3"
# LightMediaScanner plugin patches
SRC_URI += "file://0001-Add-LightMediaScanner-plugin.patch \
file://0002-lms-add-C-source-files.patch \
+ file://rygel.service \
"
+
+inherit systemd
+
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE_${PN} = ""
+SYSTEMD_SERVICE_${PN} += "rygel.service"
+
+do_install_append() {
+ # Install rygel systemd service
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ install -p -D ${WORKDIR}/rygel.service ${D}${systemd_unitdir}/system/rygel.service
+ fi
+}