From 2b24fcc47585d678e6a8ad7d207893e113492c39 Mon Sep 17 00:00:00 2001
From: "Hahn Axel (hahn)" <axel.hahn@iml.unibe.ch>
Date: Fri, 12 Mar 2021 10:56:09 +0100
Subject: [PATCH] create file for haproxy

---
 cm.sh | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/cm.sh b/cm.sh
index 97776b8..4d86836 100755
--- a/cm.sh
+++ b/cm.sh
@@ -16,6 +16,7 @@
 # 2021-02-10  <axel.hahn@iml.unibe.ch>  compare hashes, logging
 # 2021-02-12  <axel.hahn@iml.unibe.ch>  added self test
 # 2021-02-17  <axel.hahn@iml.unibe.ch>  ensure checks list of aliases; new: optional host filter before adding a cert
+# 2021-03-12  <axel.hahn@iml.unibe.ch>  create file for haproxy
 # ======================================================================
 
 
@@ -102,6 +103,9 @@ function _certTransfer(){
 	_wd "--- copy key to ${CM_dircerts}"
 	cp ${CM_filekey} ${CM_outfile_key}
 
+	_wd "--- create chained file for haproxy"
+	cat ${CM_outfile_cert} ${CM_outfile_key} > ${CM_outfile_haproxy}
+
 	_wd "--- content of output dir $CM_dircerts:"
 	ls -l $CM_dircerts/*
 }
@@ -239,6 +243,7 @@ function _setenv(){
 	CM_outfile_cert=${CM_dircerts}/${CM_fqdn}.cert.cer
 	CM_outfile_chain=${CM_dircerts}/${CM_fqdn}.fullchain.cer
 	CM_outfile_key=${CM_dircerts}/${CM_fqdn}.key.pem
+	CM_outfile_haproxy=${CM_dircerts}/${CM_fqdn}.haproxy.pem
 	CM_outfile_ca=${CM_dircerts}/${CM_fqdn}.ca.cer
 
 	# echo $CM_fqdn; set | grep "^CM_"; echo
-- 
GitLab