diff --git a/meta-leda-components/recipes-sdv/eclipse-kanto/container-management_%.bbappend b/meta-leda-components/recipes-sdv/eclipse-kanto/container-management_%.bbappend index 0401f833..944f6031 100644 --- a/meta-leda-components/recipes-sdv/eclipse-kanto/container-management_%.bbappend +++ b/meta-leda-components/recipes-sdv/eclipse-kanto/container-management_%.bbappend @@ -19,4 +19,21 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/files:" SRC_URI += "file://service.template \ - " \ No newline at end of file + file://config.json \ + " + +do_install:append() { + + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + + # config.json + install -d ${D}${CM_CFG_DD}/container-management + install -m 0644 ${WORKDIR}/config.json ${D}${CM_CFG_DD}/container-management/config.json + + # fill in the config.json template with the custom configs provided + sed -e 's,@CM_LOD_DD@,${CM_LOD_DD},g' \ + -e 's,@CM_THINGS_ENABLED@,${CM_THINGS_ENABLED},g' \ + -i ${D}${CM_CFG_DD}/container-management/config.json + + fi +} diff --git a/meta-leda-components/recipes-sdv/eclipse-kanto/files/config.json b/meta-leda-components/recipes-sdv/eclipse-kanto/files/config.json new file mode 100644 index 00000000..ecdf585f --- /dev/null +++ b/meta-leda-components/recipes-sdv/eclipse-kanto/files/config.json @@ -0,0 +1,11 @@ +{ + "manager": { + "default_ctrs_stop_timeout": 5 + }, + "log": { + "log_file": "@CM_LOD_DD@/container-management/container-management.log" + }, + "things": { + "enable": @CM_THINGS_ENABLED@ + } +}