summaryrefslogtreecommitdiffstats
path: root/recipes-sota/config/aktualizr-polling-interval.bb
blob: 53c008a0bd5615935f9bffa0e8bc5294d097777c (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
SUMMARY = "Set polling interval in Aktualizr"
DESCRIPTION = "Configures aktualizr to poll at a custom frequency (suitable for testing or other purposes)"
HOMEPAGE = "https://github.com/advancedtelematic/aktualizr"
SECTION = "base"
LICENSE = "MPL-2.0"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad"

inherit allarch

SRC_URI = " \
            file://60-polling-interval.toml \
            "

SOTA_POLLING_SEC ?= "30"

do_install_append () {
    install -m 0700 -d ${D}${libdir}/sota/conf.d
    install -m 0644 ${WORKDIR}/60-polling-interval.toml ${D}${libdir}/sota/conf.d/60-polling-interval.toml

    sed -i -e 's|@POLLING_SEC@|${SOTA_POLLING_SEC}|g' \
           ${D}${libdir}/sota/conf.d/60-polling-interval.toml
}

FILES_${PN} = " \
                ${libdir}/sota/conf.d/60-polling-interval.toml \
                "

# vim:set ts=4 sw=4 sts=4 expandtab: