Create public .pem key to encrypt backups

This commit is contained in:
7u83 2020-09-16 19:47:44 +02:00
parent 6733f1a951
commit 36d3361397
1 changed files with 4 additions and 0 deletions

View File

@ -69,8 +69,12 @@ define wmdeit_backup::scpbackup (
$tdir = "$backup_dir/$dir/daily.0"
exec {"pubkey":
command => "/usr/bin/openssl rsa -in $backup_key_file -pubout -out $backup_pub_key_file",
}
file {"$shellscript":
require => Exec["pubkey"],
mode => "700",
ensure => file,
content => "#!/bin/sh