From 8297a8050b841f090a372fd89ce22a030f62a552 Mon Sep 17 00:00:00 2001 From: Rodolphe Robles Date: Tue, 7 Apr 2020 18:16:27 +0200 Subject: [PATCH] try to make possible install on root path and change url from or to root path --- scripts/change_url | 4 ++-- scripts/install | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index f8e1b03..c8c18e1 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -68,14 +68,14 @@ then # Calculate and store the nginx config file checksum ynh_store_file_checksum "$nginx_conf_path" # ynh_replace_string - if $old_url != "/" + if $old_url != / then ynh_replace_string --match_string="const WWW_URI = '$old_path/';" --replace_string="const WWW_URI = '$new_path/';" --target_file="$final_path/config.local.php" else 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 - if $new_url != "/" + if $new_url != / then ynh_replace_string --match_string="const WWW_URI = '$old_path/';" --replace_string="const WWW_URI = '$new_path/';" --target_file="$final_path/config.local.php" else diff --git a/scripts/install b/scripts/install index ec0bd7f..10c1b7e 100644 --- a/scripts/install +++ b/scripts/install @@ -89,7 +89,7 @@ cp -a $final_path/config.dist.php $final_path/config.local.php # ynh_replace_string --match_string="const ROOT = __DIR__;" --replace_string="const ROOT = /var/www/garradin/;" --target_file="$final_path/config.local.php" ynh_replace_string --match_string="const PREFER_HTTPS = false;" --replace_string="const PREFER_HTTPS = true;" --target_file="$final_path/config.local.php" -if $path_url != "/" +if $path_url != / then ynh_replace_string --match_string="//const WWW_URI = '/asso/';" --replace_string="const WWW_URI = '$path_url/';" --target_file="$final_path/config.local.php" else