summaryrefslogtreecommitdiffstats
path: root/knot
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-09-07 04:20:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-09-07 04:20:39 +0000
commitb8527ea38c4107c67f87e6a7b856333f09b4f907 (patch)
tree00ccd84d79c6e04ab54954672427486a09eeac2a /knot
parentReleasing debian version 20210906-1. (diff)
downloadopen-infrastructure-service-tools-b8527ea38c4107c67f87e6a7b856333f09b4f907.tar.xz
open-infrastructure-service-tools-b8527ea38c4107c67f87e6a7b856333f09b4f907.zip
Merging upstream version 20210907.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'knot')
-rwxr-xr-xknot/bin/knot-reset-zones (renamed from knot/bin/knot-zone-reset)11
-rwxr-xr-xknot/share/cron/knot-reset-zones3
-rwxr-xr-xknot/share/cron/knot-zone-reset3
3 files changed, 11 insertions, 6 deletions
diff --git a/knot/bin/knot-zone-reset b/knot/bin/knot-reset-zones
index cc310b0..aae5ec1 100755
--- a/knot/bin/knot-zone-reset
+++ b/knot/bin/knot-reset-zones
@@ -33,9 +33,10 @@ for HOST in ${HOSTS}
do
case "${HOST}" in
localhost)
- echo -n "Flushing zone memory..."
+ echo -n "Resetting in-memory data for all zones..."
service knot stop
+ rm -rf /var/lib/knot/journal/*.mdb
rm -rf /var/lib/knot/timers/*.mdb
service knot start
@@ -43,9 +44,13 @@ do
;;
*)
- echo -n "Flushing ${HOST} zone memory..."
+ echo -n "'${HOST}': Resetting in-memory data for all zones..."
- ssh "${HOST}" "sudo service knot stop && rm -rf /var/lib/knot/timers/*.mdb && sudo service knot start"
+ ssh "${HOST}" \
+ "sudo service knot stop && \
+ rm -rf /var/lib/knot/journal/*.mdb && \
+ rm -rf /var/lib/knot/timers/*.mdb && \
+ sudo service knot start"
echo " done."
;;
diff --git a/knot/share/cron/knot-reset-zones b/knot/share/cron/knot-reset-zones
new file mode 100755
index 0000000..9762da4
--- /dev/null
+++ b/knot/share/cron/knot-reset-zones
@@ -0,0 +1,3 @@
+# /etc/cron.d/knot-reset-zone
+
+0 0 * * * root /usr/bin/knot-reset-zones localhost > /dev/null 2>&1
diff --git a/knot/share/cron/knot-zone-reset b/knot/share/cron/knot-zone-reset
deleted file mode 100755
index b6ec7a7..0000000
--- a/knot/share/cron/knot-zone-reset
+++ /dev/null
@@ -1,3 +0,0 @@
-# /etc/cron.d/knot-reset-zone
-
-0 0 * * * root /usr/bin/knot-reset-zone localhost > /dev/null 2>&1