frontend/app/models/publickey.rb in meroku-2.0.8 vs frontend/app/models/publickey.rb in meroku-2.0.9

- 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 #{self.user.token} cp /tmp/authorized_keys /home/#{self.user.token}/.ssh/authorized_keys") + Cmd.run(%Q[sudo -u #{self.user.apiusername} cp /tmp/authorized_keys /home/#{self.user.apiusername}/.ssh/authorized_keys]) File.delete('/tmp/authorized_keys') end end end