Always reload the service.
This commit is contained in:
parent
d2c923939e
commit
d7a98e5ba2
|
@ -16,19 +16,18 @@ logger "acme-pgpool-hook: Check if the certificate has been renewed"
|
||||||
cmp ${LE_CERTS_DIR}/privkey ${PGPOOL2_KEYFILE}
|
cmp ${LE_CERTS_DIR}/privkey ${PGPOOL2_KEYFILE}
|
||||||
RETVAL=$?
|
RETVAL=$?
|
||||||
if [ $RETVAL -eq 0 ] ; then
|
if [ $RETVAL -eq 0 ] ; then
|
||||||
logger "acme-pgpool-hook: No new cerficate. Doing nothing"
|
logger "acme-pgpool-hook: No new cerficate"
|
||||||
echo "acme-pgpool-hook: No new cerficate. Doing nothing" >> $LE_LOG_DIR/pgpool2.log
|
echo "acme-pgpool-hook: No new cerficate" >> $LE_LOG_DIR/pgpool2.log
|
||||||
exit 0
|
else
|
||||||
|
logger "acme-pgpool-hook: Copying the key file"
|
||||||
|
echo "Copy the key file" >> $LE_LOG_DIR/pgpool2.log
|
||||||
|
/bin/cp -f ${LE_CERTS_DIR}/privkey ${PGPOOL2_KEYFILE}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
logger "acme-pgpool-hook: Copying the key file"
|
|
||||||
echo "Copy the key file" >> $LE_LOG_DIR/pgpool2.log
|
|
||||||
cp ${LE_CERTS_DIR}/privkey ${PGPOOL2_KEYFILE}
|
|
||||||
chmod 440 ${PGPOOL2_KEYFILE}
|
chmod 440 ${PGPOOL2_KEYFILE}
|
||||||
chown root ${PGPOOL2_KEYFILE}
|
chown root ${PGPOOL2_KEYFILE}
|
||||||
chgrp postgres ${PGPOOL2_KEYFILE}
|
chgrp postgres ${PGPOOL2_KEYFILE}
|
||||||
|
|
||||||
logger "acme-pgpool-hook: Reload the postgresql service after a certificate renewal"
|
logger "acme-pgpool-hook: Reload the PgPoolII service after a letsencrypt execution"
|
||||||
echo "Reload the pgpool2 service" >> $LE_LOG_DIR/pgpool2.log
|
echo "Reload the pgpool2 service" >> $LE_LOG_DIR/pgpool2.log
|
||||||
if [ -x /bin/systemctl ] ; then
|
if [ -x /bin/systemctl ] ; then
|
||||||
{% if ansible_distribution_file_variety == "Debian" %}
|
{% if ansible_distribution_file_variety == "Debian" %}
|
||||||
|
|
Loading…
Reference in New Issue