lib/gogetit/config.rb in gogetit-0.13.5 vs lib/gogetit/config.rb in gogetit-0.13.6

- old
+ new

@@ -64,16 +64,16 @@ ) end config.merge!(Hashie.symbolize_keys YAML.load_file(conf_file)) # to check if lxd is well deployed and configured. - if Dir.exist?("/home/ubuntu/.config/lxc") + if Dir.exist?("#{ENV["HOME"]}/.config/lxc") - if Dir.exist?("/home/ubuntu/.config/lxc/servercerts") + if Dir.exist?("#{ENV["HOME"]}/.config/lxc/servercerts") certificates = ( - Dir.entries("/home/ubuntu/.config/lxc/servercerts") - ['.', '..'] + Dir.entries("#{ENV["HOME"]}/.config/lxc/servercerts") - ['.', '..'] ) if not certificates.empty? config[:lxd][:nodes].each do |node| @@ -92,9 +92,14 @@ 'Please check if remotes are properly registered with their certificates.' ) end else + puts "You might need to run following command to accept the certificate" + config[:lxd][:nodes].each do |node| + puts "lxc remote add --accept-certificate #{node[:name]}"\ + " #{node[:url]}" + end abort('Please check if LXD is installed properly.') end config[:libvirt][:nodes].each do |node| if node[:url].split('//')[0].include? "ssh"