aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-10-16 15:40:53 +0200
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-10-16 15:53:08 +0200
commit577991922d5262b70c95e826cf5fb426bdb822bf (patch)
tree29f867a1e35f8ce27e9d7f79f9cdcbf3d3042aed
parent653d4c299e008f383808494f3e7b4128128220eb (diff)
Add autologin service to start xds-server on startup
Change-Id: Ife3e7eb50179cf31fd61b8543c44754893cc3fa3 Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
-rw-r--r--INSTALL/tasks.d/80_xds21
1 files changed, 21 insertions, 0 deletions
diff --git a/INSTALL/tasks.d/80_xds b/INSTALL/tasks.d/80_xds
index 6762995..8b2b1a6 100644
--- a/INSTALL/tasks.d/80_xds
+++ b/INSTALL/tasks.d/80_xds
@@ -9,4 +9,25 @@ deb http://download.opensuse.org/repositories/isv:/LinuxAutomotive:/app-Developm
EOF
apt-get update -y
+
+# Only for Debug: command to test with local deb package
+#dpkg -i /root/INSTALL/agl-xds-server_0.3.0-0_amd64.deb
+
apt-get install agl-xds-server -y
+
+# devel user lingering service to be sure that devel user session is running
+# and consequently xds-server is running as a user systemd service
+mkdir -p /lib/systemd/system/ /lib/systemd/system/multi-user.target.wants/
+cat <<EOF >/lib/systemd/system/autologin.service
+[Unit]
+Description=Auto user lingering service for devel user
+After=network.target
+
+[Service]
+ExecStart=-/bin/loginctl enable-linger devel
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
+EOF
+ln -s ../autologin.service /lib/systemd/system/multi-user.target.wants/