summaryrefslogtreecommitdiffstats
path: root/recipes-sota/aktualizr
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-sota/aktualizr')
-rw-r--r--recipes-sota/aktualizr/aktualizr_git.bb9
-rw-r--r--recipes-sota/aktualizr/files/aktualizr-autoprovision.service2
2 files changed, 6 insertions, 5 deletions
diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb
index 62ee9b0..39a8ac8 100644
--- a/recipes-sota/aktualizr/aktualizr_git.bb
+++ b/recipes-sota/aktualizr/aktualizr_git.bb
@@ -12,7 +12,7 @@ SRC_URI = " \
12 file://aktualizr-autoprovision.service \ 12 file://aktualizr-autoprovision.service \
13 file://sota_autoprov.toml \ 13 file://sota_autoprov.toml \
14 " 14 "
15SRCREV = "2e897310c611e2da46f8af888bb62c09b2a2906a" 15SRCREV = "33614fb9fc8f6c9ab5fae20c16d1dca0a330b07f"
16PV = "1.0+git${SRCPV}" 16PV = "1.0+git${SRCPV}"
17 17
18S = "${WORKDIR}/git" 18S = "${WORKDIR}/git"
@@ -23,13 +23,14 @@ inherit cmake systemd
23EXTRA_OECMAKE = "-DWARNING_AS_ERROR=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=OFF -DBUILD_OSTREE=ON -DAKTUALIZR_VERSION=${PV}" 23EXTRA_OECMAKE = "-DWARNING_AS_ERROR=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=OFF -DBUILD_OSTREE=ON -DAKTUALIZR_VERSION=${PV}"
24 24
25export SOTA_AUTOPROVISION_CREDENTIALS 25export SOTA_AUTOPROVISION_CREDENTIALS
26export SOTA_PACKED_CREDENTIALS
26 27
27do_install_append() { 28do_install_append() {
28 if [ -n "${SOTA_AUTOPROVISION_CREDENTIALS}" -o -n "${SOTA_PACKED_CREDENTIALS}" ]; then 29 if [ -n "${SOTA_AUTOPROVISION_CREDENTIALS}" -o -n "${SOTA_PACKED_CREDENTIALS}" ]; then
29 install -d ${D}/${systemd_unitdir}/system 30 install -d ${D}/${systemd_unitdir}/system
30 install -m 0644 ${WORKDIR}/aktualizr-autoprovision.service ${D}/${systemd_unitdir}/system/aktualizr.service 31 install -m 0644 ${WORKDIR}/aktualizr-autoprovision.service ${D}/${systemd_unitdir}/system/aktualizr.service
31 install -d ${D}/var/sota 32 install -d ${D}/usr/lib/sota
32 install -m "0644" ${WORKDIR}/sota_autoprov.toml ${D}/var/sota/sota.toml 33 install -m "0644" ${WORKDIR}/sota_autoprov.toml ${D}/usr/lib/sota/sota.toml
33 else 34 else
34 install -d ${D}/${systemd_unitdir}/system 35 install -d ${D}/${systemd_unitdir}/system
35 install -m 0644 ${WORKDIR}/aktualizr-manual-provision.service ${D}/${systemd_unitdir}/system/aktualizr.service 36 install -m 0644 ${WORKDIR}/aktualizr-manual-provision.service ${D}/${systemd_unitdir}/system/aktualizr.service
@@ -39,5 +40,5 @@ do_install_append() {
39FILES_${PN} = " \ 40FILES_${PN} = " \
40 ${bindir}/aktualizr \ 41 ${bindir}/aktualizr \
41 ${systemd_unitdir}/system/aktualizr.service \ 42 ${systemd_unitdir}/system/aktualizr.service \
42 /var/sota/sota.toml \ 43 /usr/lib/sota/sota.toml \
43 " 44 "
diff --git a/recipes-sota/aktualizr/files/aktualizr-autoprovision.service b/recipes-sota/aktualizr/files/aktualizr-autoprovision.service
index a5b92e3..fd0ab09 100644
--- a/recipes-sota/aktualizr/files/aktualizr-autoprovision.service
+++ b/recipes-sota/aktualizr/files/aktualizr-autoprovision.service
@@ -8,7 +8,7 @@ Requires=network-online.target
8RestartSec=10 8RestartSec=10
9Restart=always 9Restart=always
10EnvironmentFile=/var/sota/sota_provisioning_url.env 10EnvironmentFile=/var/sota/sota_provisioning_url.env
11ExecStart=/bin/sh -c "/usr/bin/aktualizr --disable-keyid-validation --tls-server ${SOTA_GATEWAY_URI} --primary-ecu-hardware-id `cat /etc/hostname` --config /var/sota/sota.toml" 11ExecStart=/usr/bin/aktualizr --disable-keyid-validation --tls-server ${SOTA_GATEWAY_URI} --config /usr/lib/sota/sota.toml
12 12
13[Install] 13[Install]
14WantedBy=multi-user.target 14WantedBy=multi-user.target