diff --git a/data/hooks/conf_regen/02-ssl b/data/hooks/conf_regen/02-ssl index 45809d328..64614ffa2 100644 --- a/data/hooks/conf_regen/02-ssl +++ b/data/hooks/conf_regen/02-ssl @@ -26,7 +26,7 @@ sudo mkdir -p $ssl_dir/{ca,certs,crl,newcerts} safe_copy openssl.cnf $ssl_dir/openssl.cnf [ -f $ssl_dir/serial ] \ - || (echo "01" | sudo tee $ssl_dir/serial) + || (echo "00" | sudo tee $ssl_dir/serial) [ -f $ssl_dir/index.txt ] \ || sudo touch $ssl_dir/index.txt diff --git a/data/hooks/conf_regen/15-nginx b/data/hooks/conf_regen/15-nginx index 72c03f183..e5a8716b3 100644 --- a/data/hooks/conf_regen/15-nginx +++ b/data/hooks/conf_regen/15-nginx @@ -36,12 +36,6 @@ done if [ -f /etc/yunohost/installed ]; then - # Copy 'yunohost.local' to the main domain conf directory - main_domain=$(cat /etc/yunohost/current_host) - safe_copy yunohost_local.conf \ - /etc/nginx/conf.d/$main_domain.d/yunohost_local.conf - - need_restart=False domain_list=$(sudo yunohost domain list --plain) @@ -61,6 +55,12 @@ if [ -f /etc/yunohost/installed ]; then done + # Copy 'yunohost.local' to the main domain conf directory + main_domain=$(cat /etc/yunohost/current_host) + safe_copy yunohost_local.conf \ + /etc/nginx/conf.d/$main_domain.d/yunohost_local.conf + + # Remove old domains files for file in /etc/nginx/conf.d/*.*.conf; do domain=$(echo $file \