Fix the letsencrypt hook
This commit is contained in:
parent
721ad40994
commit
f1ba9c5752
|
@ -13,7 +13,7 @@ RETVAL=
|
||||||
echo "$DATE" >> "$LE_LOGFILE"
|
echo "$DATE" >> "$LE_LOGFILE"
|
||||||
|
|
||||||
logger "acme-minio-hook: Check if the certificate has been renewed"
|
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=$?
|
RETVAL=$?
|
||||||
if [ $RETVAL -eq 0 ] ; then
|
if [ $RETVAL -eq 0 ] ; then
|
||||||
logger "acme-minio-hook: No new cerficate."
|
logger "acme-minio-hook: No new cerficate."
|
||||||
|
@ -38,7 +38,7 @@ fi
|
||||||
|
|
||||||
chmod 440 ${MINIO_KEYFILE} ${MINIO_CERTFILE}
|
chmod 440 ${MINIO_KEYFILE} ${MINIO_CERTFILE}
|
||||||
chown root ${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"
|
logger "acme-minio-hook: Restart the minio service after a certificate renewal"
|
||||||
systemctl restart minio >> $LE_LOGFILE 2>&1
|
systemctl restart minio >> $LE_LOGFILE 2>&1
|
||||||
|
|
Loading…
Reference in New Issue