rconf 0.7.9 → 0.7.10
Sign up to get free protection for your applications and to get access to all the features.
@@ -35,15 +35,19 @@ module RightConf
|
|
35
35
|
# true:: Always return true
|
36
36
|
def run_linux
|
37
37
|
install_path(default_install_path) if install_path.nil?
|
38
|
-
abort_on_failure(
|
38
|
+
abort_on_failure(true) if abort_on_failure.nil?
|
39
39
|
unless cassandra_installed
|
40
40
|
report_check('Installing Cassandra')
|
41
41
|
url = SOURCE_BASE_URL.gsub('VERSION', version)
|
42
|
-
|
42
|
+
if File.exist?(install_path)
|
43
|
+
FileUtils.rm_rf("#{install_path}_old")
|
44
|
+
FileUtils.mv(install_path, "#{install_path}_old")
|
45
|
+
post_note "Had to move #{install_path} to #{install_path}_old"
|
46
|
+
end
|
43
47
|
FileUtils.mkdir_p(install_path)
|
44
48
|
Dir.chdir(install_path) do
|
45
|
-
Command.execute('curl', '-O', '-f', url, abort_option('Failed to download Cassandra'))
|
46
|
-
Command.execute('
|
49
|
+
Command.execute('curl', '-O', '-f', url, abort_option('Failed to download Cassandra')) unless File.exist?(File.join(install_path, File.basename(url)))
|
50
|
+
Command.execute('tar', 'xvzf', File.basename(url), abort_option('Failed to untar Cassandra'))
|
47
51
|
end
|
48
52
|
bin_path = File.join(install_path, "apache-cassandra-#{version}", 'bin')
|
49
53
|
if EnvironmentUpdater.update("PATH=$PATH:#{bin_path}", ['PATH'])
|
data/lib/rconf/version.rb
CHANGED