diff options
Diffstat (limited to 'recipes-sota/aktualizr')
-rw-r--r-- | recipes-sota/aktualizr/aktualizr-auto-prov.bb | 2 | ||||
-rw-r--r-- | recipes-sota/aktualizr/aktualizr-hsm-test-prov.bb | 2 | ||||
-rw-r--r-- | recipes-sota/aktualizr/aktualizr-implicit-prov.bb | 2 | ||||
-rw-r--r-- | recipes-sota/aktualizr/environment.inc | 10 | ||||
-rw-r--r-- | recipes-sota/aktualizr/files/aktualizr.service | 3 |
5 files changed, 18 insertions, 1 deletions
diff --git a/recipes-sota/aktualizr/aktualizr-auto-prov.bb b/recipes-sota/aktualizr/aktualizr-auto-prov.bb index 4436d48..4a802f5 100644 --- a/recipes-sota/aktualizr/aktualizr-auto-prov.bb +++ b/recipes-sota/aktualizr/aktualizr-auto-prov.bb | |||
@@ -19,6 +19,8 @@ SYSTEMD_SERVICE_${PN} = "aktualizr.service" | |||
19 | 19 | ||
20 | inherit systemd | 20 | inherit systemd |
21 | 21 | ||
22 | require environment.inc | ||
23 | |||
22 | export SOTA_PACKED_CREDENTIALS | 24 | export SOTA_PACKED_CREDENTIALS |
23 | 25 | ||
24 | do_install_append() { | 26 | do_install_append() { |
diff --git a/recipes-sota/aktualizr/aktualizr-hsm-test-prov.bb b/recipes-sota/aktualizr/aktualizr-hsm-test-prov.bb index 33e472b..4761f25 100644 --- a/recipes-sota/aktualizr/aktualizr-hsm-test-prov.bb +++ b/recipes-sota/aktualizr/aktualizr-hsm-test-prov.bb | |||
@@ -20,6 +20,8 @@ SYSTEMD_SERVICE_${PN} = "aktualizr.service" | |||
20 | 20 | ||
21 | inherit systemd | 21 | inherit systemd |
22 | 22 | ||
23 | require environment.inc | ||
24 | |||
23 | do_install() { | 25 | do_install() { |
24 | install -d ${D}/${systemd_unitdir}/system | 26 | install -d ${D}/${systemd_unitdir}/system |
25 | install -m 0644 ${WORKDIR}/aktualizr.service ${D}/${systemd_unitdir}/system/aktualizr.service | 27 | install -m 0644 ${WORKDIR}/aktualizr.service ${D}/${systemd_unitdir}/system/aktualizr.service |
diff --git a/recipes-sota/aktualizr/aktualizr-implicit-prov.bb b/recipes-sota/aktualizr/aktualizr-implicit-prov.bb index a1db87f..ba8a16b 100644 --- a/recipes-sota/aktualizr/aktualizr-implicit-prov.bb +++ b/recipes-sota/aktualizr/aktualizr-implicit-prov.bb | |||
@@ -19,6 +19,8 @@ SYSTEMD_SERVICE_${PN} = "aktualizr.service" | |||
19 | 19 | ||
20 | inherit systemd | 20 | inherit systemd |
21 | 21 | ||
22 | require environment.inc | ||
23 | |||
22 | do_install() { | 24 | do_install() { |
23 | install -d ${D}/${systemd_unitdir}/system | 25 | install -d ${D}/${systemd_unitdir}/system |
24 | install -m 0644 ${WORKDIR}/aktualizr.service ${D}/${systemd_unitdir}/system/aktualizr.service | 26 | install -m 0644 ${WORKDIR}/aktualizr.service ${D}/${systemd_unitdir}/system/aktualizr.service |
diff --git a/recipes-sota/aktualizr/environment.inc b/recipes-sota/aktualizr/environment.inc new file mode 100644 index 0000000..a811508 --- /dev/null +++ b/recipes-sota/aktualizr/environment.inc | |||
@@ -0,0 +1,10 @@ | |||
1 | do_install_append() { | ||
2 | if [ -n "${SOTA_LEGACY_SECONDARY_INTERFACE}" ]; then | ||
3 | AKTUALIZR_PARAMETERS_LEGACYSEC="--legacy-interface ${SOTA_LEGACY_SECONDARY_INTERFACE}"; | ||
4 | fi | ||
5 | |||
6 | AKTUALIZR_PARAMETERS_CONFIGFILE="--config /usr/lib/sota/sota.toml" | ||
7 | echo "AKTUALIZR_CMDLINE_PARAMETERS=${AKTUALIZR_PARAMETERS_CONFIGFILE} ${AKTUALIZR_PARAMETERS_LEGACYSEC}" > ${D}${libdir}/sota/sota.env | ||
8 | } | ||
9 | |||
10 | FILES_${PN}_append = " ${libdir}/sota/sota.env" | ||
diff --git a/recipes-sota/aktualizr/files/aktualizr.service b/recipes-sota/aktualizr/files/aktualizr.service index 8cb8d78..b6df9d7 100644 --- a/recipes-sota/aktualizr/files/aktualizr.service +++ b/recipes-sota/aktualizr/files/aktualizr.service | |||
@@ -7,7 +7,8 @@ Requires=network-online.target | |||
7 | [Service] | 7 | [Service] |
8 | RestartSec=10 | 8 | RestartSec=10 |
9 | Restart=always | 9 | Restart=always |
10 | ExecStart=/usr/bin/aktualizr --config /usr/lib/sota/sota.toml | 10 | EnvironmentFile=/usr/lib/sota/sota.env |
11 | ExecStart=/usr/bin/aktualizr $AKTUALIZR_CMDLINE_PARAMETERS | ||
11 | 12 | ||
12 | [Install] | 13 | [Install] |
13 | WantedBy=multi-user.target | 14 | WantedBy=multi-user.target |