From ed3c73348b758b10f5d0569cf7d840f04e9a57ee Mon Sep 17 00:00:00 2001 From: tituspijean Date: Mon, 3 Sep 2018 18:37:36 +0200 Subject: [PATCH] [enh] Use ynh_replace_string instead of sed in upgrade --- scripts/upgrade | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 1ac8302..ba3d1b8 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -137,11 +137,11 @@ fi # Bug in Nginx with locations and aliases (see http://stackoverflow.com/a/35102259 ) if [ $path_url = "/" ]; then - sed -i "s@__LOCATION_HACK__@@g" ../conf/nginx.conf - sed -i "s@__PATH_HACK__@/@g" ../conf/nginx.conf + ynh_replace_string "__LOCATION_HACK__" "" "../conf/nginx.conf" + ynh_replace_string "__PATH_HACK__" "/" "../conf/nginx.conf" else - sed -i "s@__LOCATION_HACK__@$path_url@g" ../conf/nginx.conf - sed -i "s@__PATH_HACK__@$path_url$path_url@g" ../conf/nginx.conf + ynh_replace_string "__LOCATION_HACK__" "$path_url" "../conf/nginx.conf" + ynh_replace_string "__PATH_HACK__" "$path_url$path_url" "../conf/nginx.conf" fi # Create a dedicated nginx config