diff --git a/scripts/install b/scripts/install index 92c0723..ac20a0d 100644 --- a/scripts/install +++ b/scripts/install @@ -29,8 +29,8 @@ ynh_script_progression --message="Adding system configurations related to $app.. ynh_add_nginx_config # Create NGINX config to access /_synapse/admin endpoint -synapse_domain=$(ynh_app_setting_get --app=$synapse_app --key=domain) -synapse_port=$(ynh_app_setting_get --app=$synapse_app --key=synapse_port) +synapse_domain=$(ynh_app_setting_get --app="$synapse_app" --key=domain) +synapse_port=$(ynh_app_setting_get --app="$synapse_app" --key=synapse_port) ynh_add_config --template="endpoint.nginx.conf" --destination="/etc/nginx/conf.d/${synapse_domain}.d/$app.endpoint.conf" #================================================= diff --git a/scripts/remove b/scripts/remove index 1e11c2e..2479a96 100644 --- a/scripts/remove +++ b/scripts/remove @@ -14,12 +14,18 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression --message="Removing system configurations related to $app..." --weight=1 +ynh_exec_warn ls -lah "/etc/nginx/conf.d/${synapse_domain}.d/$app.endpoint.conf" + # Remove the dedicated NGINX config ynh_remove_nginx_config +ynh_exec_warn ls -lah "/etc/nginx/conf.d/${synapse_domain}.d/$app.endpoint.conf" + # Remove NGINX config that enabled /_synapse/admin endpoint ynh_secure_remove --file="/etc/nginx/conf.d/${synapse_domain}.d/$app.endpoint.conf" +ynh_exec_warn ls -lah "/etc/nginx/conf.d/${synapse_domain}.d/$app.endpoint.conf" + #================================================= # END OF SCRIPT #=================================================