summaryrefslogtreecommitdiffstats
path: root/dehydrated/share/hooks/deploy_ocsp.extra
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@open-infrastructure.net>2022-07-07 10:02:08 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2022-07-07 14:14:21 +0000
commitfab9b7a030eb1b638e40f59515da5fd771fcb0b1 (patch)
tree13abf76c0492c9af85d4773a1fed56c3c9928898 /dehydrated/share/hooks/deploy_ocsp.extra
parentReleasing version 20220704. (diff)
downloadservice-tools-fab9b7a030eb1b638e40f59515da5fd771fcb0b1.tar.xz
service-tools-fab9b7a030eb1b638e40f59515da5fd771fcb0b1.zip
Merging the different extra certificate files into one dehydrated hook handling all extra copies.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to '')
-rwxr-xr-xdehydrated/share/hooks/deploy_ocsp.extra (renamed from dehydrated/share/hooks/deploy_ocsp.fullchain-privkey)14
1 files changed, 12 insertions, 2 deletions
diff --git a/dehydrated/share/hooks/deploy_ocsp.fullchain-privkey b/dehydrated/share/hooks/deploy_ocsp.extra
index b408f03..36d0302 100755
--- a/dehydrated/share/hooks/deploy_ocsp.fullchain-privkey
+++ b/dehydrated/share/hooks/deploy_ocsp.extra
@@ -21,7 +21,17 @@
set -e
-FILE="$(readlink "${OCSPFILE}")"
+echo " + Creating extra ocsp links..."
+
DIRECTORY="$(dirname "${OCSPFILE}")"
+OCSP="$(readlink "${OCSPFILE}")"
+
+for EXTRA in fullchain-privkey privkey-fullchain
+do
+ EXTRA1="$(echo ${EXTRA} | awk -F- '{ print $1 }')"
+ EXTRA2="$(echo ${EXTRA} | awk -F- '{ print $2 }')"
+
+ ln -sf "${OCSP}" "${DIRECTORY}/cert.${EXTRA1}-${EXTRA2}.pem.ocsp"
+done
-ln -sf "${FILE}" "${DIRECTORY}/cert.fullchain-privkey.pem.ocsp"
+echo " done."