From 86d31fd5662be2093fb4b48dae07dd3c2ef2cb1b Mon Sep 17 00:00:00 2001 From: tituspijean Date: Tue, 1 Mar 2022 11:39:34 +0100 Subject: [PATCH] Avoid NGINX config conflits --- conf/{synapse.nginx.conf => endpoint.nginx.conf} | 0 scripts/backup | 2 +- scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 2 +- 5 files changed, 4 insertions(+), 4 deletions(-) rename conf/{synapse.nginx.conf => endpoint.nginx.conf} (100%) diff --git a/conf/synapse.nginx.conf b/conf/endpoint.nginx.conf similarity index 100% rename from conf/synapse.nginx.conf rename to conf/endpoint.nginx.conf diff --git a/scripts/backup b/scripts/backup index d50ae1f..e9ea8a1 100644 --- a/scripts/backup +++ b/scripts/backup @@ -44,7 +44,7 @@ ynh_backup --src_path="$final_path" #================================================= ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" -ynh_backup --src_path="/etc/nginx/conf.d/${synapse_domain}.d/synapse-admin.conf" +ynh_backup --src_path="/etc/nginx/conf.d/${synapse_domain}.d/$app.endpoint.conf" #================================================= # BACKUP LOGROTATE diff --git a/scripts/install b/scripts/install index 8895085..e0dfae6 100644 --- a/scripts/install +++ b/scripts/install @@ -103,7 +103,7 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=2 ynh_add_nginx_config # Create NGINX config to access /_synapse/admin endpoint -ynh_add_config --template="synapse.nginx.conf" --destination="/etc/nginx/conf.d/${synapse_domain}.d/synapse-admin.conf" +ynh_add_config --template="endpoint.nginx.conf" --destination="/etc/nginx/conf.d/${synapse_domain}.d/$app.endpoint.conf" #================================================= # SPECIFIC SETUP diff --git a/scripts/restore b/scripts/restore index 3e6478f..e9610b3 100644 --- a/scripts/restore +++ b/scripts/restore @@ -43,7 +43,7 @@ test ! -d $final_path || ynh_die --message="There is already a directory: $final ynh_script_progression --message="Restoring the NGINX configuration..." ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" -ynh_restore_file --origin_path="/etc/nginx/conf.d/${synapse_domain}.d/synapse-admin.conf" +ynh_restore_file --origin_path="/etc/nginx/conf.d/${synapse_domain}.d/$app.endpoint.conf" #================================================= # RECREATE THE DEDICATED USER diff --git a/scripts/upgrade b/scripts/upgrade index b40662d..36bdc56 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -111,7 +111,7 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - ynh_add_nginx_config # Create NGINX config to access /_synapse/admin endpoint -ynh_add_config --template="synapse.nginx.conf" --destination="/etc/nginx/conf.d/${synapse_domain}.d/synapse-admin.conf" +ynh_add_config --template="endpoint.nginx.conf" --destination="/etc/nginx/conf.d/${synapse_domain}.d/$app.endpoint.conf" #================================================= # UPGRADE DEPENDENCIES