From 72822ce9873cf713f451a8f123e9f9ee9e6c4af0 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 23 Jan 2021 00:15:35 +0100 Subject: [PATCH] Replace #sub_path_only and #root_path_only in the template *before* calling ynh_add_config, otherwise the it ain't in the checksum computation --- data/helpers.d/nginx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/data/helpers.d/nginx b/data/helpers.d/nginx index 050a24117..f7157cd8d 100644 --- a/data/helpers.d/nginx +++ b/data/helpers.d/nginx @@ -20,15 +20,16 @@ ynh_add_nginx_config () { local finalnginxconf="/etc/nginx/conf.d/$domain.d/$app.conf" - ynh_add_config --template="../conf/nginx.conf" --destination="$finalnginxconf" - if [ "${path_url:-}" != "/" ] then - ynh_replace_string --match_string="^#sub_path_only" --replace_string="" --target_file="$finalnginxconf" + ynh_replace_string --match_string="^#sub_path_only" --replace_string="" --target_file="../conf/nginx.conf" else - ynh_replace_string --match_string="^#root_path_only" --replace_string="" --target_file="$finalnginxconf" + ynh_replace_string --match_string="^#root_path_only" --replace_string="" --target_file="../conf/nginx.conf" fi + ynh_add_config --template="../conf/nginx.conf" --destination="$finalnginxconf" + + ynh_systemd_action --service_name=nginx --action=reload }