blob: f58a7fad2d8428fd40e03fad5df3561369981549 [file] [log] [blame]
Facter.add('backuppc_pubkey_rsa') do
setcode do
os_family = Facter.value(:osfamily)
sshkey_path ||= case Facter.value(:osfamily)
when 'RedHat'
'/var/lib/BackupPC/.ssh/id_rsa.pub'
when 'Debian'
'/var/lib/backuppc/.ssh/id_rsa.pub'
end
if File.exists?(sshkey_path)
File.open(sshkey_path).read.split(' ')[1]
end
end
end