From d5e861b052e5f510dbe5dd78db81f49af8000245 Mon Sep 17 00:00:00 2001 From: Mirza Krak Date: Wed, 7 Aug 2019 13:05:01 +0000 Subject: [PATCH] add ServerCertificate entry in mender.conf if servert.crt was installed MEN-2640 Changelog: Title Based on work from: Signed-off-by: Yevgeniy Nurseitov Signed-off-by: Mirza Krak --- convert-stage-4.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/convert-stage-4.sh b/convert-stage-4.sh index 2f5ec81..a6b7498 100755 --- a/convert-stage-4.sh +++ b/convert-stage-4.sh @@ -204,6 +204,10 @@ install_files() { if [ -n "${server_cert}" ]; then sudo install -m 0444 ${server_cert} ${primary_dir}/${sysconfdir}/server.crt fi + + if [ -e "${primary_dir}/${sysconfdir}/server.crt" ]; then + jq_inplace '.ServerCertificate = \"'${primary_dir}'/'${sysconfdir}'/server.crt\"' ${primary_dir}/${sysconfdir}/mender.conf + fi } do_install_mender() {