beaglebone-getting-started: add systemd unit
authorKoen Kooi <koen@dominion.thruhere.net>
Sat, 12 Nov 2011 12:42:06 +0000 (13:42 +0100)
committerKoen Kooi <koen@dominion.thruhere.net>
Sat, 12 Nov 2011 12:42:06 +0000 (13:42 +0100)
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
recipes-misc/payload/beaglebone-getting-started.bb
recipes-misc/payload/beaglebone-getting-started/bone101.service [new file with mode: 0644]

index 7ca84c23da497fab05638857daff1de8a5c60d81..88fb0981f50cb85a78deb64f03b47ad31bb5faaf 100644 (file)
@@ -1,6 +1,6 @@
 DESCRIPTION = "BeagleBone Getting Started Guide"
 
-PR = "r7"
+PR = "r8"
 
 inherit allarch
 
@@ -8,12 +8,17 @@ LICENSE = "GPLv2+ && MIT && PD && others"
 LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=603591dea023c3c75b48e07cb47ce639"
 
 SRCREV = "ee3af61403b087c2882ba539d3358ba25c5b8dc7"
-SRC_URI = "git://github.com/jadonk/beaglebone-getting-started.git"
+SRC_URI = "git://github.com/jadonk/beaglebone-getting-started.git \
+           file://bone101.service"
+
 S = "${WORKDIR}/git"
 
 do_install() {
        install -d ${D}${datadir}/${PN}
        cp -a ${S}/* ${D}${datadir}/${PN}
+
+       install -d ${D}${base_libdir}/systemd/system
+       install -m 0644 ${WORKDIR}/bone101.service ${D}${base_libdir}/systemd/system
 }
 
-FILES_${PN} += "${datadir}/${PN}"
+FILES_${PN} += "${datadir}/${PN} ${base_libdir}/systemd/system"
diff --git a/recipes-misc/payload/beaglebone-getting-started/bone101.service b/recipes-misc/payload/beaglebone-getting-started/bone101.service
new file mode 100644 (file)
index 0000000..49562ba
--- /dev/null
@@ -0,0 +1,11 @@
+[Unit]
+Description=Beaglebone 101 presentation
+ConditionPathExists=|/var/lib/cloud9
+
+[Service]
+WorkingDirectory=/var/lib/cloud9
+ExecStart=/usr/bin/node bone101.js
+
+[Install]
+WantedBy=multi-user.target
+