summaryrefslogtreecommitdiffstats
path: root/dehydrated/share/hooks/exit_hook.service-reload
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-04-14 20:14:57 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-04-14 20:14:57 +0000
commit0d9754dfa7234a21e864e6333b76360590685d33 (patch)
tree6cc8e939ed64a2323d18f10f5dfc8747ff32235b /dehydrated/share/hooks/exit_hook.service-reload
parentAdding upstream version 20220105. (diff)
downloadopen-infrastructure-service-tools-0d9754dfa7234a21e864e6333b76360590685d33.tar.xz
open-infrastructure-service-tools-0d9754dfa7234a21e864e6333b76360590685d33.zip
Adding upstream version 20220414.upstream/20220414
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dehydrated/share/hooks/exit_hook.service-reload')
-rwxr-xr-xdehydrated/share/hooks/exit_hook.service-reload19
1 files changed, 18 insertions, 1 deletions
diff --git a/dehydrated/share/hooks/exit_hook.service-reload b/dehydrated/share/hooks/exit_hook.service-reload
index daba7dd..c3fbdc2 100755
--- a/dehydrated/share/hooks/exit_hook.service-reload
+++ b/dehydrated/share/hooks/exit_hook.service-reload
@@ -21,9 +21,11 @@
set -e
+SERVICES="apache2 haproxy knot postgresql redis-server"
+
echo " + Reloading services..."
-for SERVICE in apache2 haproxy postgresql redis-server
+for SERVICE in ${SERVICES}
do
if service ${SERVICE} status > /dev/null 2>&1
then
@@ -34,3 +36,18 @@ do
echo " done."
fi
done
+
+NUMBER="$(systemctl | grep -c 'kresd@[0-9].service')"
+
+if [ "${NUMBER}" -gt 0 ]
+then
+ echo -n " + knot-resolver:"
+
+ for NUMBER in $(seq 1 "${NUMBER}")
+ do
+ echo -n " #${NUMBER}"
+ service kresd@${NUMBER} restart
+ done
+
+ echo " done."
+fi