From 3f720c9b7a30c7b091ce97a3d2ca551c4240888d Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Tue, 8 May 2018 20:07:41 +0200 Subject: [PATCH] Fix the openldap letsencrypt hook. --- openldap-server/files/openldap-letsencrypt-acme.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/openldap-server/files/openldap-letsencrypt-acme.sh b/openldap-server/files/openldap-letsencrypt-acme.sh index 3f1f07c8..ce0d1066 100644 --- a/openldap-server/files/openldap-letsencrypt-acme.sh +++ b/openldap-server/files/openldap-letsencrypt-acme.sh @@ -27,7 +27,11 @@ chown openldap $OPENLDAP_CERTDIR/privkey.pem chmod 400 $OPENLDAP_CERTDIR/privkey.pem echo "Restart the openldap service" >> $LE_LOG_DIR/openldap.log -service slapd restart >/dev/null 2>&1 +if [ -x /bin/systemctl ] ; then + systemctl force-reload slapd >/dev/null 2>&1 +else + service slapd force-reload >/dev/null 2>&1 +fi echo "Done." >> $LE_LOG_DIR/openldap.log exit 0