diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-04-30 22:02:24 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-04-30 22:02:24 +0000 |
commit | 4b2ffced088c16fab3660444f596d14063122205 (patch) | |
tree | 34bef914328f7b6df83ddf515a645c27b667ebf0 /dehydrated | |
parent | Adding upstream version 20220414. (diff) | |
download | open-infrastructure-service-tools-upstream/20220430.tar.xz open-infrastructure-service-tools-upstream/20220430.zip |
Adding upstream version 20220430.upstream/20220430
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | dehydrated/share/hooks/exit_hook.fix-permissions | 5 | ||||
-rwxr-xr-x | dehydrated/share/hooks/exit_hook.service-reload | 23 |
2 files changed, 18 insertions, 10 deletions
diff --git a/dehydrated/share/hooks/exit_hook.fix-permissions b/dehydrated/share/hooks/exit_hook.fix-permissions index 1e089f7..6a1958d 100755 --- a/dehydrated/share/hooks/exit_hook.fix-permissions +++ b/dehydrated/share/hooks/exit_hook.fix-permissions @@ -21,6 +21,11 @@ set -e +if [ ! -e /var/lib/dehydrated/certs ] +then + exit 0 +fi + echo " + Fixing permissions..." if getent group ssl-cert > /dev/null 2>&1 diff --git a/dehydrated/share/hooks/exit_hook.service-reload b/dehydrated/share/hooks/exit_hook.service-reload index c3fbdc2..ebe2d23 100755 --- a/dehydrated/share/hooks/exit_hook.service-reload +++ b/dehydrated/share/hooks/exit_hook.service-reload @@ -37,17 +37,20 @@ do fi done -NUMBER="$(systemctl | grep -c 'kresd@[0-9].service')" - -if [ "${NUMBER}" -gt 0 ] +if service kresd@1 status > /dev/null 2>&1 then - echo -n " + knot-resolver:" + 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 + for NUMBER in $(seq 1 "${NUMBER}") + do + echo -n " #${NUMBER}" + service kresd@${NUMBER} restart + done - echo " done." + echo " done." + fi fi |