Method: CommonFunctions.get_remote_appscale_home

Defined in:
lib/common_functions.rb

.get_remote_appscale_home(ip, key) ⇒ Object



462
463
464
465
466
467
468
469
470
471
# File 'lib/common_functions.rb', line 462

def self.get_remote_appscale_home(ip, key)
  cat = "cat /etc/appscale/home"
  remote_cmd = "ssh -i #{key} #{SSH_OPTIONS} 2>&1 root@#{ip} '#{cat}'"
  possible_home = CommonFunctions.shell("#{remote_cmd}").chomp
  if possible_home.nil? or possible_home.empty?
    return "/root/appscale/"
  else
    return possible_home
  end
end