From: Leon Anavi Date: Thu, 5 Nov 2015 13:16:36 +0000 (+0200) Subject: rygel: add systemd service X-Git-Tag: albacore_1.0~24 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?p=AGL%2Fmeta-agl.git;a=commitdiff_plain;h=6f0bdfc2c3d11cf18d149593a189c48a2a14e3d2 rygel: add systemd service Change-Id: I30193ff62fdea97c2cd100a031c60458879d11c8 Signed-off-by: Leon Anavi --- 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 +}