From 249f14a03846a50dc3b712b3bca388a818da1547 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 14 Apr 2022 21:53:53 +0200 Subject: Adding knot-resolver handling in dehydrated service-reload hook. Signed-off-by: Daniel Baumann --- dehydrated/share/hooks/exit_hook.service-reload | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'dehydrated/share') 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 -- cgit v1.2.3