Fix the letsencrypt hook

This commit is contained in:
Andrea Dell'Amico 2023-02-16 19:15:12 +01:00
parent 721ad40994
commit f1ba9c5752
Signed by: andrea.dellamico
GPG Key ID: 147ABE6CEB9E20FF
1 changed files with 2 additions and 2 deletions

View File

@ -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