aboutsummaryrefslogtreecommitdiffstats
path: root/INSTALL/tasks.d/80_xds
blob: f624af6957d097c6ae27b2707c6e08e7d616b0c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash

export DISTRO="Debian_9.0"

[[ -z "$XDS_RELEASE_BRANCH" ]] && XDS_RELEASE_BRANCH="AGL_Master"

wget -t 3 -T 60 -O - https://download.opensuse.org/repositories/isv:/LinuxAutomotive:/${XDS_RELEASE_BRANCH}/${DISTRO}/Release.key | apt-key add -

cat >> /etc/apt/sources.list.d/AGL.list <<EOF
deb http://download.opensuse.org/repositories/isv:/LinuxAutomotive:/${XDS_RELEASE_BRANCH}/${DISTRO}/ ./
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/