Skip to content

Commit

Permalink
Update recipe for Kanto Update Manager
Browse files Browse the repository at this point in the history
Signed-off-by: Hristo Bozhilov <Hristo.Bozhilov@bosch.com>
  • Loading branch information
hristobojilov committed Aug 30, 2023
1 parent 6d46f1b commit 6678bba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion recipes-management/update-manager/files/service.template
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Requires=mosquitto.service

[Service]
Type=simple
ExecStart=@UM_BIN_DD@/update-manager -config-file @UM_CFG_DD@/update-manager/config.json
ExecStart=@UM_BIN_DD@/kanto-update-manager -config-file @UM_CFG_DD@/update-manager/config.json
Restart=always

[Install]
Expand Down
10 changes: 5 additions & 5 deletions recipes-management/update-manager/update-manager_git.bb
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ inherit systemd

SYSTEMD_AUTO_ENABLE = "enable"
SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}"
SYSTEMD_SERVICE:${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','update-manager.service','',d)}"
SYSTEMD_SERVICE:${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','kanto-update-manager.service','',d)}"

# workaround for network issue
do_compile[network] = "1"

FILES:${PN} += "${UM_SYSUNIT_DD}/update-manager.service"
FILES:${PN} += "${UM_SYSUNIT_DD}/kanto-update-manager.service"
FILES:${PN} += "${UM_BIN_DD}/update-manager"
# ensure all additional resources are properly packed in the resulting package if provided
FILES:${PN} += "${UM_CFG_DD}/update-manager/config.json"
Expand All @@ -40,7 +40,7 @@ RPROVIDES:${PN} += "kanto/update-manager"
do_install() {
install -d "${D}/${UM_BIN_DD}"

install -m 0755 "${GO_BUILD_BINDIR}/update-manager" "${D}${UM_BIN_DD}/update-manager"
install -m 0755 "${GO_BUILD_BINDIR}/update-manager" "${D}${UM_BIN_DD}/kanto-update-manager"

if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
install -d ${D}${UM_SYSUNIT_DD}
Expand All @@ -52,12 +52,12 @@ do_install() {
install -m 0644 ${WORKDIR}/config.json ${D}${UM_CFG_DD}/update-manager

# service.template as service
install -m 0644 ${WORKDIR}/service.template ${D}${UM_SYSUNIT_DD}/update-manager.service
install -m 0644 ${WORKDIR}/service.template ${D}${UM_SYSUNIT_DD}/kanto-update-manager.service

# fill in the update-manager systemd service template with the custom configs provided
sed -e 's,@UM_BIN_DD@,${UM_BIN_DD},g' \
-e 's,@UM_CFG_DD@,${UM_CFG_DD},g' \
-i ${D}${UM_SYSUNIT_DD}/update-manager.service
-i ${D}${UM_SYSUNIT_DD}/kanto-update-manager.service

# fill in the config.json template with the custom configs provided
sed -e 's,@UM_LOG_DD@,${UM_LOG_DD},g' \
Expand Down

0 comments on commit 6678bba

Please sign in to comment.