diff options
author | Daniel Baumann <daniel.baumann@open-infrastructure.net> | 2023-06-19 19:52:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@open-infrastructure.net> | 2023-06-19 19:52:58 +0000 |
commit | 0571d0cd34fbaa88a186e71700502bc9a96a3f59 (patch) | |
tree | ee1511577d45ffafc424d077df10189ee916fc8e /dehydrated/share/hooks | |
parent | Adding root_intermediate_cert to exit_hook.extra-cleanup dehydrated hook. (diff) | |
download | service-tools-0571d0cd34fbaa88a186e71700502bc9a96a3f59.tar.xz service-tools-0571d0cd34fbaa88a186e71700502bc9a96a3f59.zip |
Creating relative links for extra certificates in deploy_cert.extra dehydrated hook.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to '')
-rwxr-xr-x | dehydrated/share/hooks/deploy_cert.extra | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/dehydrated/share/hooks/deploy_cert.extra b/dehydrated/share/hooks/deploy_cert.extra index b0d8737..391f767 100755 --- a/dehydrated/share/hooks/deploy_cert.extra +++ b/dehydrated/share/hooks/deploy_cert.extra @@ -46,17 +46,17 @@ case "${CHAIN}" in # intermediate (R3) mv "${TMPFILE}00" "${DIRECTORY}/intermediate-${TIMESTAMP}.pem" - ln -sf "${DIRECTORY}/intermediate-${TIMESTAMP}.pem" "${DIRECTORY}/intermediate.pem" + ln -sf "intermediate-${TIMESTAMP}.pem" "${DIRECTORY}/intermediate.pem" # root (ISRG Root X1) mv "${TMPFILE}01" "${DIRECTORY}/root-${TIMESTAMP}.pem" - ln -sf "${DIRECTORY}/root-${TIMESTAMP}.pem" "${DIRECTORY}/root.pem" + ln -sf "root-${TIMESTAMP}.pem" "${DIRECTORY}/root.pem" ;; short) # intermediate (R3) grep -Ev '^$' "${DIRECTORY}/chain-${TIMESTAMP}.pem" > "${DIRECTORY}/intermediate-${TIMESTAMP}.pem" - ln -sf "${DIRECTORY}/intermediate-${TIMESTAMP}.pem" "${DIRECTORY}/intermediate.pem" + ln -sf "intermediate-${TIMESTAMP}.pem" "${DIRECTORY}/intermediate.pem" # root (ISRG Root X1) ISSUER_URI="$(openssl x509 -in "${DIRECTORY}/chain-${TIMESTAMP}.pem" -text -noout | grep 'Authority Information Access:' -A1 | awk -FURI: '/http/ { print $2 }')" @@ -64,7 +64,7 @@ case "${CHAIN}" in if [ -n "${ISSUER_URI}" ] then wget -q "${ISSUER_URI}" -O - | openssl x509 -outform PEM > "${DIRECTORY}/root-${TIMESTAMP}.pem" - ln -sf "${DIRECTORY}/root-${TIMESTAMP}.pem" "${DIRECTORY}/root.pem" + ln -sf "root-${TIMESTAMP}.pem" "${DIRECTORY}/root.pem" fi ;; esac |