summaryrefslogtreecommitdiffstats
path: root/knot/bin/knot-zone-reset
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2021-09-06 18:20:00 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2021-09-06 19:32:35 +0000
commite5578da38e57730288a701a44b863ede146c626b (patch)
tree90af5a2f27b0de895afbf273995c23310f68203e /knot/bin/knot-zone-reset
parentReleasing version 20210906. (diff)
downloadservice-tools-e5578da38e57730288a701a44b863ede146c626b.tar.xz
service-tools-e5578da38e57730288a701a44b863ede146c626b.zip
Updating knot-zone-reset to really remove all in-memory data completely.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to '')
-rwxr-xr-xknot/bin/knot-zone-reset11
1 files changed, 8 insertions, 3 deletions
diff --git a/knot/bin/knot-zone-reset b/knot/bin/knot-zone-reset
index cc310b0..aae5ec1 100755
--- a/knot/bin/knot-zone-reset
+++ b/knot/bin/knot-zone-reset
@@ -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."
;;