summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@open-infrastructure.net>2024-12-27 20:30:42 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2024-12-27 20:30:42 +0000
commit4f908a741824d45d3a46abeaf44b53fa48f02c2f (patch)
tree379e5b3cb666d5eaba2335868ef1a3c2f651ea29
parentReleasing version 20240930. (diff)
downloadservice-tools-4f908a741824d45d3a46abeaf44b53fa48f02c2f.tar.xz
service-tools-4f908a741824d45d3a46abeaf44b53fa48f02c2f.zip
Adding automatic reload support for dovecot in dehydrated hooks.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
-rwxr-xr-xdehydrated/share/hooks/exit_hook.service-reload10
1 files changed, 9 insertions, 1 deletions
diff --git a/dehydrated/share/hooks/exit_hook.service-reload b/dehydrated/share/hooks/exit_hook.service-reload
index 68bc6ec..efd2c3f 100755
--- a/dehydrated/share/hooks/exit_hook.service-reload
+++ b/dehydrated/share/hooks/exit_hook.service-reload
@@ -38,6 +38,14 @@ Run_chrony ()
fi
}
+Run_dovecot ()
+{
+ if grep -Eqrs '^ *ssl_cert' /etc/dovecot/*.conf /etc/dovecot/conf.d/*.conf
+ then
+ service dovecot reload
+ fi
+}
+
Run_freeradius ()
{
if grep -Eqrs 'certificate_file = /var/lib/dehydrated' /etc/freeradius/*/*
@@ -104,7 +112,7 @@ Run_redis_server ()
echo " + Reloading services:"
-SERVICES="apache2 chrony freeradius haproxy knot-resolver postfix postgresql redis-sentinel redis-server"
+SERVICES="apache2 chrony dovecot freeradius haproxy knot-resolver postfix postgresql redis-sentinel redis-server"
for SERVICE in ${SERVICES}
do