summaryrefslogtreecommitdiff
path: root/lib/leap_cli/commands
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2014-12-08 14:11:06 -0800
committerelijah <elijah@riseup.net>2014-12-08 14:11:06 -0800
commite2a066dec8af7aae421401c9b9cb30752e7aa0d6 (patch)
tree7f9570fcc1b14afa0c53156e35400ff3be674204 /lib/leap_cli/commands
parentd4b6d29b0981b7b79c06a73165ea938c522acb78 (diff)
for command `leap db destroy`, make sure that tapicero sequence log is also removed, otherwise tapicero will not work with new db.
Diffstat (limited to 'lib/leap_cli/commands')
-rw-r--r--lib/leap_cli/commands/db.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/leap_cli/commands/db.rb b/lib/leap_cli/commands/db.rb
index acc2f13..ea83b0c 100644
--- a/lib/leap_cli/commands/db.rb
+++ b/lib/leap_cli/commands/db.rb
@@ -15,6 +15,7 @@ module LeapCli; module Commands
if nodes.any?
ssh_connect(nodes, connect_options(options)) do |ssh|
ssh.run('/etc/init.d/bigcouch stop && test ! -z "$(ls /opt/bigcouch/var/lib/ 2> /dev/null)" && rm -r /opt/bigcouch/var/lib/* && echo "db destroyed" || echo "db already destroyed"')
+ ssh.run('grep ^seq_file /etc/leap/tapicero.yaml | cut -f2 -d\" | xargs rm -v')
end
else
say 'No nodes'