diff --git a/conf/nginx/plain/acme-challenge.conf.inc b/conf/nginx/acme-challenge.conf.inc similarity index 100% rename from conf/nginx/plain/acme-challenge.conf.inc rename to conf/nginx/acme-challenge.conf.inc diff --git a/conf/nginx/plain/global.conf b/conf/nginx/global.conf similarity index 100% rename from conf/nginx/plain/global.conf rename to conf/nginx/global.conf diff --git a/conf/nginx/plain/ssowat.conf b/conf/nginx/ssowat.conf similarity index 100% rename from conf/nginx/plain/ssowat.conf rename to conf/nginx/ssowat.conf diff --git a/conf/nginx/plain/yunohost_http_errors.conf.inc b/conf/nginx/yunohost_http_errors.conf.inc similarity index 100% rename from conf/nginx/plain/yunohost_http_errors.conf.inc rename to conf/nginx/yunohost_http_errors.conf.inc diff --git a/conf/nginx/plain/yunohost_panel.conf.inc b/conf/nginx/yunohost_panel.conf.inc similarity index 100% rename from conf/nginx/plain/yunohost_panel.conf.inc rename to conf/nginx/yunohost_panel.conf.inc diff --git a/conf/nginx/plain/yunohost_sso.conf.inc b/conf/nginx/yunohost_sso.conf.inc similarity index 100% rename from conf/nginx/plain/yunohost_sso.conf.inc rename to conf/nginx/yunohost_sso.conf.inc diff --git a/hooks/conf_regen/15-nginx b/hooks/conf_regen/15-nginx index 8f845984c..53f5b6d6a 100755 --- a/hooks/conf_regen/15-nginx +++ b/hooks/conf_regen/15-nginx @@ -4,6 +4,8 @@ set -e . /usr/share/yunohost/helpers + + do_init_regen() { if [[ $EUID -ne 0 ]]; then echo "You must be root to run this script" 1>&2 @@ -17,7 +19,13 @@ do_init_regen() { mkdir -p "$nginx_conf_dir" # install plain conf files - cp plain/* "$nginx_conf_dir" + cp acme-challenge.conf.in "$nginx_conf_dir" + cp global.conf "$nginx_conf_dir" + cp ssowat.conf "$nginx_conf_dir" + cp yunohost_http_errors.conf.inc "$nginx_conf_dir" + cp yunohost_panel.conf.inc "$nginx_conf_dir" + cp yunohost_sso.conf.inc "$nginx_conf_dir" + # probably run with init: just disable default site, restart NGINX and exit rm -f "${nginx_dir}/sites-enabled/default" @@ -54,7 +62,13 @@ do_pre_regen() { mkdir -p "$nginx_conf_dir" # install / update plain conf files - cp plain/* "$nginx_conf_dir" + cp acme-challenge.conf.in "$nginx_conf_dir" + cp global.conf "$nginx_conf_dir" + cp ssowat.conf "$nginx_conf_dir" + cp yunohost_http_errors.conf.inc "$nginx_conf_dir" + cp yunohost_panel.conf.inc "$nginx_conf_dir" + cp yunohost_sso.conf.inc "$nginx_conf_dir" + # remove the panel overlay if this is specified in settings panel_overlay="$(jq -r '.ssowat_panel_overlay_enabled' <<< "$YNH_SETTINGS" | int_to_bool)" if [ "$panel_overlay" == "False" ]; then