summaryrefslogtreecommitdiffstats
path: root/dehydrated
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2022-04-14 19:53:53 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2022-04-14 19:55:35 +0000
commit249f14a03846a50dc3b712b3bca388a818da1547 (patch)
treebd240112086733c1d2282cd5c29b9c9b0ae292dc /dehydrated
parentAdding knot to list of services to restart in dehydrated hook. (diff)
downloadservice-tools-249f14a03846a50dc3b712b3bca388a818da1547.tar.xz
service-tools-249f14a03846a50dc3b712b3bca388a818da1547.zip
Adding knot-resolver handling in dehydrated service-reload hook.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to '')
-rwxr-xr-xdehydrated/share/hooks/exit_hook.service-reload15
1 files changed, 15 insertions, 0 deletions
diff --git a/dehydrated/share/hooks/exit_hook.service-reload b/dehydrated/share/hooks/exit_hook.service-reload
index 8ae362d..cee1d98 100755
--- a/dehydrated/share/hooks/exit_hook.service-reload
+++ b/dehydrated/share/hooks/exit_hook.service-reload
@@ -34,3 +34,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