[u-boot-test-hooks PATCH 2/2] labgrid-sjg: Add systemd scripts
Simon Glass
sjg at chromium.org
Fri Feb 21 21:43:02 CET 2025
Add example scripts to start the coordinator and exporter.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
labgrid-sjg/labgrid-coordinator.service | 14 ++++++++++++++
labgrid-sjg/labgrid-exporter.service | 22 ++++++++++++++++++++++
2 files changed, 36 insertions(+)
create mode 100644 labgrid-sjg/labgrid-coordinator.service
create mode 100644 labgrid-sjg/labgrid-exporter.service
diff --git a/labgrid-sjg/labgrid-coordinator.service b/labgrid-sjg/labgrid-coordinator.service
new file mode 100644
index 0000000..baabfb3
--- /dev/null
+++ b/labgrid-sjg/labgrid-coordinator.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Labgrid Coordinator
+After=network.target
+
+[Service]
+Environment="PYTHONUNBUFFERED=1"
+ExecStart=/home/labgrid/.local/bin/labgrid-coordinator
+Restart=on-failure
+User=labgrid
+StateDirectory=labgrid-coordinator
+WorkingDirectory=/home/labgrid/labgrid-coordinator
+
+[Install]
+WantedBy=multi-user.target
diff --git a/labgrid-sjg/labgrid-exporter.service b/labgrid-sjg/labgrid-exporter.service
new file mode 100644
index 0000000..e3339e7
--- /dev/null
+++ b/labgrid-sjg/labgrid-exporter.service
@@ -0,0 +1,22 @@
+[Unit]
+Description=Labgrid Exporter
+After=network-online.target
+Wants=network-online.target
+
+[Service]
+Environment="PYTHONUNBUFFERED=1"
+Environment=HDCTOOLS=/vid/software/devel/ubtest/standalone-hdctools LG_COORDINATOR=kea:20408 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/vid/software/devel/ubtest/standalone-hdctools
+PassEnvironment=HDCTOOLS LG_COORDINATOR PATH
+ExecStart=/home/labgrid/.local/bin/labgrid-exporter /vid/software/devel/ubtest/lab/cfg/kea_export.yaml
+
+Restart=on-failure
+RestartForceExitStatus=100
+RestartSec=30
+User=labgrid
+WorkingDirectory=/home/labgrid/labgrid-exporter
+
+# Adjust to your distribution (most often "dialout" or "tty")
+SupplementaryGroups=dialout plugdev
+
+[Install]
+WantedBy=multi-user.target
--
2.43.0
More information about the U-Boot
mailing list