backuppc: added support for deploying ssh keys and changed to use apache module.

This commit is contained in:
Timo Mkinen 2009-11-30 18:07:17 +02:00
parent 9151b42da7
commit 2cbd509021
2 changed files with 39 additions and 0 deletions

View file

@ -0,0 +1,13 @@
Facter.add('backuppc_sshkey') do
setcode do
begin
match = File.read('/var/lib/BackupPC/.ssh/id_rsa.pub')[/^ssh-rsa ([^ ]+)/, 1]
if match
data = match
end
rescue
data = ''
end
data
end
end