diff --git a/hooks/conf_regen/02-ssl b/hooks/conf_regen/02-ssl index e98c70c6e..1aaab59d1 100755 --- a/hooks/conf_regen/02-ssl +++ b/hooks/conf_regen/02-ssl @@ -111,8 +111,9 @@ do_post_regen() { mv /usr/share/yunohost/yunohost-config/ssl/yunoCA/* ${ssl_dir} rm -rf /usr/share/yunohost/yunohost-config # Overwrite openssl.cnf because it may still contain references to the old yunoCA dir - rm -f ${ssl_dir}/openssl.ca.cnf install -D -m 644 ${template_dir}/openssl.cnf "${ssl_dir}/openssl.cnf" + install -D -m 644 ${template_dir}/openssl.cnf "${ssl_dir}/openssl.ca.cnf" + sed -i "s/yunohost.org/${main_domain}/g" openssl.ca.cnf fi mkdir -p ${ssl_dir}/{ca,certs,crl,newcerts}