summaryrefslogtreecommitdiffstats
path: root/knot/bin
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-09-07 04:20:23 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-09-07 04:20:23 +0000
commit0ef915a3ce5f39005e279d2513f1473ff862add5 (patch)
tree6a328e762efe05666963a482e3c000760afb930f /knot/bin
parentAdding upstream version 20210906. (diff)
downloadopen-infrastructure-service-tools-0ef915a3ce5f39005e279d2513f1473ff862add5.tar.xz
open-infrastructure-service-tools-0ef915a3ce5f39005e279d2513f1473ff862add5.zip
Adding upstream version 20210907.upstream/20210907
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'knot/bin')
-rwxr-xr-xknot/bin/knot-reset-zones (renamed from knot/bin/knot-zone-reset)11
1 files changed, 8 insertions, 3 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."
;;