From e2a066dec8af7aae421401c9b9cb30752e7aa0d6 Mon Sep 17 00:00:00 2001 From: elijah Date: Mon, 8 Dec 2014 14:11:06 -0800 Subject: for command `leap db destroy`, make sure that tapicero sequence log is also removed, otherwise tapicero will not work with new db. --- lib/leap_cli/commands/db.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/leap_cli/commands/db.rb') 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' -- cgit v1.2.3