From f1ba9c5752ee4f2ee2a2e8acdb6a1112e54a5629 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Thu, 16 Feb 2023 19:15:12 +0100 Subject: [PATCH] Fix the letsencrypt hook --- templates/minio-letsencrypt-hook.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/minio-letsencrypt-hook.j2 b/templates/minio-letsencrypt-hook.j2 index a92aeba..3e9c822 100644 --- a/templates/minio-letsencrypt-hook.j2 +++ b/templates/minio-letsencrypt-hook.j2 @@ -13,7 +13,7 @@ RETVAL= echo "$DATE" >> "$LE_LOGFILE" logger "acme-minio-hook: Check if the certificate has been renewed" -cmp ${LE_CERTS_DIR}/privkey ${MINIO_KEYFILE} +cmp ${LE_CERTS_DIR}/fullchain ${MINIO_CERTFILE} RETVAL=$? if [ $RETVAL -eq 0 ] ; then logger "acme-minio-hook: No new cerficate." @@ -38,7 +38,7 @@ fi chmod 440 ${MINIO_KEYFILE} ${MINIO_CERTFILE} chown root ${MINIO_KEYFILE} ${MINIO_CERTFILE} -chgrp minio ${MINIO_KEYFILE} ${MINIO_CERTFILE} +chgrp minio-user ${MINIO_KEYFILE} ${MINIO_CERTFILE} logger "acme-minio-hook: Restart the minio service after a certificate renewal" systemctl restart minio >> $LE_LOGFILE 2>&1