From 456639bdf8ac50489fb3b87a864c434271d07e7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Greg=20Kar=C3=A9kinian?= Date: Thu, 31 Dec 2020 11:38:49 +0100 Subject: [PATCH] Fix a syntax error in certbot dirsrv hook The newline was not escaped and rendered as an actual newline Fixes #272 --- site-cookbooks/kosmos-dirsrv/resources/instance.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site-cookbooks/kosmos-dirsrv/resources/instance.rb b/site-cookbooks/kosmos-dirsrv/resources/instance.rb index 55aafc4..8470e55 100644 --- a/site-cookbooks/kosmos-dirsrv/resources/instance.rb +++ b/site-cookbooks/kosmos-dirsrv/resources/instance.rb @@ -135,7 +135,7 @@ for domain in $RENEWED_DOMAINS; do pk12util -i #{Chef::Config[:file_cache_path]}/#{new_resource.hostname}.p12 -d #{inst_dir} -W '' # Remove the encryption key entries from the current database. # They will be recreated on restart for the new certificate - awk '! /^dn: cn=3D|AES,cn=encrypted attribute keys,cn=userRoot/ {print; printf "\n" ; }' RS="" #{inst_dir}/dse.ldif > #{inst_dir}/dse_new.ldif + awk '! /^dn: cn=3D|AES,cn=encrypted attribute keys,cn=userRoot/ {print; printf "\\n" ; }' RS="" #{inst_dir}/dse.ldif > #{inst_dir}/dse_new.ldif mv #{inst_dir}/dse_new.ldif #{inst_dir}/dse.ldif systemctl restart #{service_name} ;; -- 2.25.1