Fix the letsencrypt hook, it looked for a file that does not exist.

This commit is contained in:
Andrea Dell'Amico 2021-07-05 09:42:52 +02:00
parent 5c550d3a7f
commit d2c923939e
Signed by: adellam
GPG Key ID: 147ABE6CEB9E20FF
1 changed files with 1 additions and 6 deletions

View File

@ -12,17 +12,12 @@ DATE=$( date )
[ ! -d $LE_LOG_DIR ] && mkdir $LE_LOG_DIR
echo "$DATE" >> $LE_LOG_DIR/pgpool2.log
if [ -f /etc/default/letsencrypt ] ; then
. /etc/default/letsencrypt
else
echo "No letsencrypt default file" >> $LE_LOG_DIR/pgpool2.log
fi
logger "acme-pgpool-hook: Check if the certificate has been renewed"
cmp ${LE_CERTS_DIR}/privkey ${PGPOOL2_KEYFILE}
RETVAL=$?
if [ $RETVAL -eq 0 ] ; then
logger "acme-pgpool-hook: No new cerficate. Doing nothing"
echo "acme-pgpool-hook: No new cerficate. Doing nothing" >> $LE_LOG_DIR/pgpool2.log
exit 0
fi