From 043d93b4807b7e0ab9f3dcdafd7d3e69a1b3368e Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 19 Jun 2023 07:41:15 +0200 Subject: Stripping empty lines from partial files when using short chain in deploy_cert.extra dehydrated hook. Signed-off-by: Daniel Baumann --- dehydrated/share/hooks/deploy_cert.extra | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dehydrated/share/hooks') 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) -- cgit v1.2.3