summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@open-infrastructure.net>2023-06-19 05:41:15 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2023-06-19 05:41:15 +0000
commit043d93b4807b7e0ab9f3dcdafd7d3e69a1b3368e (patch)
treeb22d748613a65ba726d0472a3f73227e2c20df23
parentUpdating chain coments in deploy_cert.extra dehydrated hook. (diff)
downloadservice-tools-043d93b4807b7e0ab9f3dcdafd7d3e69a1b3368e.tar.xz
service-tools-043d93b4807b7e0ab9f3dcdafd7d3e69a1b3368e.zip
Stripping empty lines from partial files when using short chain in deploy_cert.extra dehydrated hook.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
-rwxr-xr-xdehydrated/share/hooks/deploy_cert.extra2
1 files changed, 1 insertions, 1 deletions
diff --git a/dehydrated/share/hooks/deploy_cert.extra b/dehydrated/share/hooks/deploy_cert.extra
index 9e7b9b2..3f6541a 100755
--- a/dehydrated/share/hooks/deploy_cert.extra
+++ b/dehydrated/share/hooks/deploy_cert.extra
@@ -55,7 +55,7 @@ case "${CHAIN}" in
short)
# intermediate (R3)
- cp "${DIRECTORY}/chain-${TIMESTAMP}.pem" "${DIRECTORY}/intermediate-${TIMESTAMP}.pem"
+ grep -Ev '^$' "${DIRECTORY}/chain-${TIMESTAMP}.pem" > "${DIRECTORY}/intermediate-${TIMESTAMP}.pem"
ln -sf "${DIRECTORY}/intermediate-${TIMESTAMP}.pem" "${DIRECTORY}/intermediate.pem"
# root (ISRG Root X1)