backuppc: added support for deploying ssh keys and changed to use apache module.
This commit is contained in:
parent
9151b42da7
commit
2cbd509021
2 changed files with 39 additions and 0 deletions
13
backuppc/plugins/facter/backuppc_sshkey.rb
Normal file
13
backuppc/plugins/facter/backuppc_sshkey.rb
Normal 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
|
26
backuppc/templates/BackupPC.conf.erb
Normal file
26
backuppc/templates/BackupPC.conf.erb
Normal file
|
@ -0,0 +1,26 @@
|
|||
<Directory /usr/share/BackupPC/sbin/>
|
||||
# BackupPC requires valid authentication in order for the web interface to
|
||||
# function properly. One can view the web interface without authentication
|
||||
# though all functionality is disabled.
|
||||
#
|
||||
# htpasswd -c /etc/BackupPC/apache.users yourusername
|
||||
#
|
||||
|
||||
#order deny,allow
|
||||
#deny from all
|
||||
#allow from 127.0.0.1
|
||||
#AuthType Basic
|
||||
#AuthUserFile /etc/BackupPC/apache.users
|
||||
#AuthName "BackupPC
|
||||
|
||||
<%= backuppc_auth %>
|
||||
|
||||
<% backuppc_adminusers.each do |user| -%>
|
||||
require user <%= user %>
|
||||
<% end -%>
|
||||
|
||||
</Directory>
|
||||
|
||||
|
||||
Alias /BackupPC/images /usr/share/BackupPC/html/
|
||||
ScriptAlias /BackupPC /usr/share/BackupPC/sbin/BackupPC_Admin
|
Loading…
Add table
Reference in a new issue