Fix multiple domains in renewal.

This commit is contained in:
Roger A. Light 2022-12-30 10:34:18 +00:00
parent 0fb4e2bf6a
commit 48f276f88d

View File

@ -17,7 +17,8 @@ MY_DOMAIN=example.com
# Set the directory that the certificates will be copied to. # Set the directory that the certificates will be copied to.
CERTIFICATE_DIR=/etc/mosquitto/certs CERTIFICATE_DIR=/etc/mosquitto/certs
if [ "${RENEWED_DOMAINS}" = "${MY_DOMAIN}" ]; then for D in ${RENEWED_DOMAINS}; do
if [ "${D}" = "${MY_DOMAIN}" ]; then
# Copy new certificate to Mosquitto directory # Copy new certificate to Mosquitto directory
cp ${RENEWED_LINEAGE}/fullchain.pem ${CERTIFICATE_DIR}/server.pem cp ${RENEWED_LINEAGE}/fullchain.pem ${CERTIFICATE_DIR}/server.pem
cp ${RENEWED_LINEAGE}/privkey.pem ${CERTIFICATE_DIR}/server.key cp ${RENEWED_LINEAGE}/privkey.pem ${CERTIFICATE_DIR}/server.key
@ -31,3 +32,4 @@ if [ "${RENEWED_DOMAINS}" = "${MY_DOMAIN}" ]; then
# Tell Mosquitto to reload certificates and configuration # Tell Mosquitto to reload certificates and configuration
pkill -HUP -x mosquitto pkill -HUP -x mosquitto
fi fi
done