diff options
-rw-r--r-- | CHANGELOG.txt | 9 | ||||
-rw-r--r-- | VERSION.txt | 2 | ||||
-rwxr-xr-x | dehydrated/share/hooks/exit_hook.fix-permissions | 5 | ||||
-rwxr-xr-x | dehydrated/share/hooks/exit_hook.service-reload | 23 | ||||
-rwxr-xr-x | knot-resolver/bin/kresd-cache-clear | 8 |
5 files changed, 29 insertions, 18 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 52a6c18..950a499 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,12 @@ +2022-04-30 Daniel Baumann <daniel.baumann@open-infrastructure.net> + + * Releasing version 20220430. + + [ Daniel Baumann ] + * Using localhost as fallback in kresd-cache-clear. + * Avoid failing if /var/lib/dehydrated/certs doesn't exist in dehydrated fix-permissions hook. + * Restarting kresd threads only if at least one exists to support building chroots in dehydrated service-reload hook. + 2022-04-14 Daniel Baumann <daniel.baumann@open-infrastructure.net> * Releasing version 20220414. diff --git a/VERSION.txt b/VERSION.txt index 343bc37..bbfd1ea 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -20220414 +20220430 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 diff --git a/knot-resolver/bin/kresd-cache-clear b/knot-resolver/bin/kresd-cache-clear index 79e62a8..49c2462 100755 --- a/knot-resolver/bin/kresd-cache-clear +++ b/knot-resolver/bin/kresd-cache-clear @@ -21,13 +21,7 @@ set -e -HOSTS="${*}" - -if [ -z "${HOSTS}" ] -then - echo "Usage: ${0} localhost|[HOST1 HOST2 ...]" >&2 - exit 1 -fi +HOSTS="${*:-localhost}" for HOST in ${HOSTS} do |