olds/easy-debian-init.rb
# Method to handle the keyrings, here we can update a lot of keys only sending
# as an array.
Method to handle the keyrings, here we can update a lot of keys only sending
as an array.
Method to handle the keyrings here we can update a lot of keys only sending as an array .
def conf_keyrings(url,keys=[])
      gpg = '/usr/bin/gpg'
      keys.each do |key|
        import_key = system "#{gpg} --keyserver #{url} --recv-keys #{key}"
        check_status(import_key,"Updating #{Tty.white}GPG KEY: #{key}")
        sleep_time(2)
      end
      apt_key='/usr/bin/apt-key'
      add_pubring = system "#{apt_key} add ~root/.gnupg/pubring.gpg"
      check_status(add_pubring,"Adding the #{Tty.white}Pubring")
      docker_key = system("apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D")
      check_status(docker_key,"Adding the #{Tty.white}Docker Key")
      nginx_key = system("wget -qO- http://nginx.org/packages/keys/nginx_signing.key | apt-key add -")
      check_status(nginx_key,"Adding the #{Tty.white}Nginx Key")
    end
def conf_keyrings ( url , keys = [ ] ) gpg = '/usr/bin/gpg' keys . each do | key | import_key = system "#{gpg} --keyserver #{url} --recv-keys #{key}" check_status ( import_key , "Updating #{Tty.white}GPG KEY: #{key}" ) sleep_time ( 2 ) end apt_key = '/usr/bin/apt-key' add_pubring = system "#{apt_key} add ~root/.gnupg/pubring.gpg" check_status ( add_pubring , "Adding the #{Tty.white}Pubring" ) docker_key = system ( "apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D" ) check_status ( docker_key , "Adding the #{Tty.white}Docker Key" ) nginx_key = system ( "wget -qO- http://nginx.org/packages/keys/nginx_signing.key | apt-key add -" ) check_status ( nginx_key , "Adding the #{Tty.white}Nginx Key" ) end
Method to handle the keyrings, here we can update a lot of keys only sending
as an array.
Method to handle the keyrings here we can update a lot of keys only sending as an array .
#TODO: Adjust this method to work as bellow.
url
keys