Fix letsencrypt case when RENEWED_DOMAINS is empty.

This commit is contained in:
Roger A. Light 2021-06-10 11:55:01 +01:00
parent 0d1bc03665
commit b7c3d52cd4

View File

@ -13,11 +13,11 @@
# executable after editing it to your needs.
# Set which domain this script will be run for
MY_DOMAIN="example.com"
MY_DOMAIN=example.com
# Set the directory that the certificates will be copied to.
CERTIFICATE_DIR=/etc/mosquitto/certs
if [ ${RENEWED_DOMAINS} = ${MY_DOMAIN} ]; then
if [ "${RENEWED_DOMAINS}" = "${MY_DOMAIN}" ]; then
# Copy new certificate to Mosquitto directory
cp ${RENEWED_LINEAGE}/fullchain.pem ${CERTIFICATE_DIR}/server.pem
cp ${RENEWED_LINEAGE}/privkey.pem ${CERTIFICATE_DIR}/server.key