sendmail: Clean up old certificates from /etc/mail/certs before creating new ones.
This commit is contained in:
parent
8986993b14
commit
6e34edbcb2
1 changed files with 1 additions and 1 deletions
|
@ -54,7 +54,7 @@ class sendmail::common {
|
|||
}
|
||||
exec { "populate-etc-mail-certs":
|
||||
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
||||
command => "csplit -k ${cabundle} '/BEGIN/' '{1000}' ; sh -c 'for i in x* ; do name=`openssl x509 -hash -noout -in \$i`.0 ; openssl x509 -hash -in \$i -out \$name ; done' && rm -f x* .0",
|
||||
command => "rm -f /etc/mail/certs/*.0 ; csplit -k ${cabundle} '/BEGIN/' '{1000}' ; sh -c 'for i in x* ; do name=`openssl x509 -hash -noout -in \$i`.0 ; openssl x509 -hash -in \$i -out \$name ; done' && rm -f x* .0",
|
||||
cwd => "/etc/mail/certs",
|
||||
onlyif => "find /etc/mail/certs ! -newer ${cabundle} | egrep '.*' || [ -z \"`ls /etc/mail/certs`\" ]",
|
||||
require => File["/etc/mail/certs"],
|
||||
|
|
Loading…
Add table
Reference in a new issue