Class: Apocalyse::Client::Install

Inherits:
Object
  • Object
show all
Defined in:
lib/apocalypse-client/install.rb

Instance Method Summary collapse

Instance Method Details

#install!Object



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/apocalypse-client/install.rb', line 4

def install!
  check_file_access   # Start of by checking if we can write the Cron job
  read_values         # Now ask the user for the configuration input
  validate            # Make sure the input is correct
  check_server        # Check if the provided server is accessible 
  write_host_file     # Write the configuration file for this host
  install_cron_job    # Finally install the Cronjob
  
  puts "All done.."
rescue Exception => e
 puts e.message
end

#self_update!Object



22
23
24
25
26
27
28
# File 'lib/apocalypse-client/install.rb', line 22

def self_update!
  update_gem         # gem update apocalypse-client
  update_command     # Do a update command
  
rescue Exception => e
  puts e.message
end

#update!Object



17
18
19
20
# File 'lib/apocalypse-client/install.rb', line 17

def update!
  puts "Updating..."
  #  Nothing here as nothing needs to be updated yet.
end