frontend/app/models/publickey.rb in meroku-2.0.7 vs frontend/app/models/publickey.rb in meroku-2.0.8
- old
+ new
@@ -6,10 +6,10 @@
# called when something added/?/etc to publickeys table
def do_refresh
Rails.logger.debug "DB8 publickey.rb:def self.refresh called"
if Publickey.all.size > 0
File.write('/tmp/authorized_keys', Publickey.pluck(:data).join("\n") )
- system("sudo -u git cp /tmp/authorized_keys /home/git/.ssh/authorized_keys")
+ system("sudo -u #{self.user.token} cp /tmp/authorized_keys /home/#{self.user.token}/.ssh/authorized_keys")
File.delete('/tmp/authorized_keys')
end
end
end