diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-08-28 04:56:44 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-08-28 04:56:44 +0000 |
commit | 99e7823b24e116ade7279cf45336e7f0c74e40d6 (patch) | |
tree | 8cec3018a7921e185096e69ac986542945b826a5 /bin/exit_hook.slapd.sh | |
parent | Updating. (diff) | |
download | progress-linux-tools-99e7823b24e116ade7279cf45336e7f0c74e40d6.tar.xz progress-linux-tools-99e7823b24e116ade7279cf45336e7f0c74e40d6.zip |
Updating.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'bin/exit_hook.slapd.sh')
-rwxr-xr-x | bin/exit_hook.slapd.sh | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/bin/exit_hook.slapd.sh b/bin/exit_hook.slapd.sh deleted file mode 100755 index 2cb74cf..0000000 --- a/bin/exit_hook.slapd.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh - -set -e - -NAME="$(cat /etc/hostname)" -DEHYDRATED_PATH="/srv/${NAME}/dehydrated/certs/${NAME}" -SLAPD_CERT_PATH="/etc/crypto/tls" -CA_CHAIN_NAME="cachain" - -mkdir -p "${SLAPD_CERT_PATH}" -unset CHANGE - -if ! cmp -s "${DEHYDRATED_PATH}/${CA_CHAIN_NAME}.pem" "${SLAPD_CERT_PATH}/${NAME}-${CA_CHAIN_NAME}.pem" -then - /usr/bin/cp "${DEHYDRATED_PATH}/${CA_CHAIN_NAME}.pem" "${SLAPD_CERT_PATH}/${NAME}-${CA_CHAIN_NAME}.pem" - CHANGE=true -fi - -if ! cmp -s "${DEHYDRATED_PATH}/cert.pem" "${SLAPD_CERT_PATH}/${NAME}.pem" -then - /usr/bin/cp "${DEHYDRATED_PATH}/cert.pem" "${SLAPD_CERT_PATH}/${NAME}.pem" - CHANGE=true -fi - -if ! cmp -s "${DEHYDRATED_PATH}/privkey.pem" "${SLAPD_CERT_PATH}/${NAME}.key" -then - /usr/bin/cp "${DEHYDRATED_PATH}/privkey.pem" "${SLAPD_CERT_PATH}/${NAME}.key" - CHANGE=true -fi - -if ! cmp -s "${DEHYDRATED_PATH}/fullchain.pem" "${SLAPD_CERT_PATH}/${NAME}-fullchain.pem" -then - /usr/bin/cp "${DEHYDRATED_PATH}/fullchain.pem" "${SLAPD_CERT_PATH}/${NAME}-fullchain.pem" - CHANGE=true -fi - -if [ ! -z ${CHANGE} ] -then - chmod 0640 /etc/crypto/tls/${NAME}* - chgrp ssl-cert /etc/crypto/tls/${NAME}* - systemctl restart slapd.service -fi |