File tree Expand file tree Collapse file tree 4 files changed +54
-1
lines changed Expand file tree Collapse file tree 4 files changed +54
-1
lines changed Original file line number Diff line number Diff line change 1+ # ## This is an example labgrid exporter configuration. This file will be installed
2+ # ## into /etc/labgrid/configuration.yaml on your target and describes your exporter
3+ # ## services.
4+ # ##
5+ # ## Adapt and extend the below configuration to your needs and place it in the
6+ # ## BSP layer of you project. Create a python3-labgrid.bbappend file that adds this
7+ # ## file to your build:
8+ # ##
9+ # ## FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
10+ # ##
11+ # ## SRC_URI_append := " file://configuration.yaml"
12+ # ##
13+ # ## ---
14+ # ##
15+ #
16+ # example-group1-remote:
17+ # location: example-location-1-remote
18+ # USBSerialPort:
19+ # match:
20+ # 'ID_SERIAL_SHORT': 'FTA8E2HP'
21+ # speed: 115200
Original file line number Diff line number Diff line change 1+ ### This is an example labgrid exporter ip configuration. This file will be installed
2+ ### into /etc/labgrid/environment and read by the labgrid exporter systemd service.
3+
4+ LABGRID_COORDINATOR_IP=127.0.0.1
5+ LABGRID_COORDINATOR_PORT=20408
Original file line number Diff line number Diff line change 1+ [Unit]
2+ Description =Labgrid exporter
3+ After =network-online.target
4+ Wants =network-online.target
5+
6+ [Service]
7+ Type =simple
8+ EnvironmentFile =/etc/labgrid/environment
9+ ExecStart =/usr/bin/python3 /usr/bin/labgrid-exporter -d -x ws://${LABGRID_COORDINATOR_IP}:${LABGRID_COORDINATOR_PORT}/ws /etc/labgrid/configuration.yaml
10+
11+ [Install]
12+ WantedBy =multi-user.target
Original file line number Diff line number Diff line change @@ -23,6 +23,9 @@ RDEPENDS_${PN} = " \
2323
2424SRC_URI = " \
2525 git://github.com/labgrid-project/labgrid.git;branch=master \
26+ file://configuration.yaml \
27+ file://labgrid-exporter.service \
28+ file://environment \
2629 "
2730
2831SRCREV = "30c6cb61e6292f36847e80ec3e5f730ddc4bac72"
@@ -31,4 +34,16 @@ S = "${WORKDIR}/git"
3134DEPENDS += "python3-setuptools-scm-native"
3235DEPENDS += "python3-pytest-runner-native"
3336
34- inherit setuptools3
37+ inherit setuptools3 systemd
38+
39+ SYSTEMD_SERVICE_${PN} = "labgrid-exporter.service"
40+
41+ do_install_append () {
42+ install -d ${D}${sysconfdir} /labgrid
43+ install -m 0644 ${WORKDIR} /configuration . yaml ${D}${sysconfdir} /labgrid
44+ install -m 0644 ${WORKDIR} /environment ${D}${sysconfdir} /labgrid
45+ install -d ${D}${systemd_system_unitdir}
46+ install -m 0644 ${WORKDIR} /labgrid -exporter . service ${D}${systemd_system_unitdir} /
47+ }
48+
49+ FILES_${PN} += "${sysconfdir} ${systemd_system_unitdir} "
You can’t perform that action at this time.
0 commit comments