Skip to content

Commit

Permalink
attempt to fix keys script
Browse files Browse the repository at this point in the history
  • Loading branch information
akerl committed Feb 10, 2020
1 parent 732cde2 commit fba9307
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/keys.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
##
# Add SSH keys

require 'open-uri'
require 'uri'
require 'fileutils'

path = "#{@paths[:build]}/root/.ssh/authorized_keys"
keys = open(@config[:keys][:url]).read
keys = URI.open(@config[:keys][:url]).read

FileUtils.mkdir_p File.dirname(path)

File.open(path, 'w') { |fh| fh << keys }

0 comments on commit fba9307

Please sign in to comment.