From 5f01245abddc187b74a68d42cfd2a5caad02b17a Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Tue, 7 Apr 2020 16:48:22 +0200 Subject: [PATCH] try to make better check_packages dependencies --- scripts/change_url | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index 0798955..e768040 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -58,6 +58,8 @@ final_path=/var/www/$app # Change the path in the nginx config file if [ $change_path -eq 1 ] then + # ynh_replace_string + ynh_replace_string --match_string="const WWW_URI = '$old_path/';" --replace_string="const WWW_URI = '$new_path/';" --target_file="$final_path/config.local.php" # 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 @@ -67,8 +69,6 @@ then 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 - 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 @@ -81,7 +81,6 @@ then # Store file checksum for the new config file location ynh_store_file_checksum "/etc/nginx/conf.d/$new_domain.d/$app.conf" # ynh_replace_string - 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 # GENERIC FINALISATION