summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@open-infrastructure.net>2022-10-30 15:27:29 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2022-10-30 15:27:29 +0000
commit46579ce752493772d66fea862954e7e0e0cc3e5d (patch)
tree7e3c307d6270534e56d0d9cd07775f33241bbd59
parentReleasing version 20221030. (diff)
downloadservice-tools-46579ce752493772d66fea862954e7e0e0cc3e5d.tar.xz
service-tools-46579ce752493772d66fea862954e7e0e0cc3e5d.zip
Correcting file handling errors in dehydrated deploy_cert.extra hook.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
-rwxr-xr-xdehydrated/share/hooks/deploy_cert.extra6
1 files changed, 3 insertions, 3 deletions
diff --git a/dehydrated/share/hooks/deploy_cert.extra b/dehydrated/share/hooks/deploy_cert.extra
index efca7b0..14585af 100755
--- a/dehydrated/share/hooks/deploy_cert.extra
+++ b/dehydrated/share/hooks/deploy_cert.extra
@@ -31,10 +31,10 @@ TMPFILE="$(mktemp -p "${DIRECTORY}" -u ca.XXXXXXXXXX)"
grep -Ev '^$' "${CHAINFILE}" | csplit -f "${TMPFILE}" -s -z - '/-----BEGIN CERTIFICATE-----/' '{*}'
mv "${TMPFILE}00" "${DIRECTORY}/ca-intermediate-${TIMESTAMP}.pem"
-ln -s "${DIRECTORY}/ca-intermediate-${TIMESTAMP}.pem" "${DIRECTORY}/ca-intermediate.pem"
+ln -sf "${DIRECTORY}/ca-intermediate-${TIMESTAMP}.pem" "${DIRECTORY}/ca-intermediate.pem"
mv "${TMPFILE}01" "${DIRECTORY}/ca-root-${TIMESTAMP}.pem"
-ln -s "${DIRECTORY}/ca-root-${TIMESTAMP}.pem" "${DIRECTORY}/ca-root.pem"
+ln -sf "${DIRECTORY}/ca-root-${TIMESTAMP}.pem" "${DIRECTORY}/ca-root.pem"
echo " done."
@@ -45,7 +45,7 @@ do
EXTRA1="$(echo ${EXTRA} | awk -F- '{ print $1 }')"
EXTRA2="$(echo ${EXTRA} | awk -F- '{ print $2 }')"
- cat "${EXTRA1}-${TIMESTAMP}.pem" "${EXTRA2}-${TIMESTAMP}.pem" > "${DIRECTORY}/${EXTRA1}-${EXTRA2}-${TIMESTAMP}.pem"
+ cat "${DIRECTORY}/${EXTRA1}-${TIMESTAMP}.pem" "${DIRECTORY}/${EXTRA2}-${TIMESTAMP}.pem" > "${DIRECTORY}/${EXTRA1}-${EXTRA2}-${TIMESTAMP}.pem"
ln -sf "${EXTRA1}-${EXTRA2}-${TIMESTAMP}.pem" "${DIRECTORY}/cert.${EXTRA1}-${EXTRA2}.pem"
echo " done."