From 40f6ed1741000cb0fcbca626899acf927cb5c576 Mon Sep 17 00:00:00 2001 From: Rodolphe Robles Date: Tue, 7 Apr 2020 01:23:44 +0200 Subject: [PATCH] change also the path for change_url --- scripts/change_url | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/change_url b/scripts/change_url index d9da808..dbd60b3 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -61,13 +61,13 @@ then # Make a backup of the original nginx config file if modified ynh_backup_if_checksum_is_different "$nginx_conf_path" # Replace locations starting with old_path + ynh_replace_string --match_string="//const WWW_URI = '$old_path/';" --replace_string="const WWW_URI = '$new_path/';" --target_file="$final_path/config.local.php" # Look for every location possible patterns (see https://nginx.org/en/docs/http/ngx_http_core_module.html#location) ynh_replace_string "location\( \(=\|~\|~\*\|\^~\)\)\? $old_path" "location\1 $new_path" "$nginx_conf_path" # Replace path in "return" directives ynh_replace_string "return \([[:digit:]]\{3\}\) $old_path" "return \1 $new_path" "$nginx_conf_path" # Calculate and store the nginx config file checksum ynh_store_file_checksum "$nginx_conf_path" - ynh_replace_string --match_string="//const WWW_URI = '$old_path/';" --replace_string="const WWW_URI = '$new_path/';" --target_file="$final_path/config.local.php" fi