Having an openssl.ca.cnf is needed to create domains

This commit is contained in:
Alexandre Aubin 2021-12-01 00:24:31 +01:00
parent 34b7e667a7
commit 9488b419c3

View file

@ -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}