From 7536ad48829765989a364832524761125cc6b009 Mon Sep 17 00:00:00 2001 From: Rodolphe Robles Date: Wed, 8 Apr 2020 00:29:27 +0200 Subject: [PATCH] come back to this code, have not found how to install on root path with this version --- scripts/change_url | 7 +------ scripts/install | 4 ++-- scripts/upgrade | 1 - 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index 682215d..ce53487 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -68,12 +68,7 @@ then # Calculate and store the nginx config file checksum ynh_store_file_checksum "$nginx_conf_path" # ynh_replace_string - if [ $new_path != '/' ] - 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 = '/';" --target_file="$final_path/config.local.php" - fi + 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 # Change the domain for nginx diff --git a/scripts/install b/scripts/install index 5c34850..b11cf9a 100644 --- a/scripts/install +++ b/scripts/install @@ -87,8 +87,8 @@ ynh_setup_source --dest_dir="$final_path" 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" -ynh_replace_string --match_string="//const WWW_URI = '/asso/';" --replace_string="const WWW_URI = '/';" --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" +ynh_replace_string --match_string="//const WWW_URI = '/asso/';" --replace_string="const WWW_URI = '$path_url/';" --target_file="$final_path/config.local.php" #================================================= # Files owned by user app diff --git a/scripts/upgrade b/scripts/upgrade index 06ddfde..e92853f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -148,7 +148,6 @@ fi 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" ynh_replace_string --match_string="//const WWW_URI = '/asso/';" --replace_string="const WWW_URI = '$path_url/';" --target_file="$final_path/config.local.php" #=================================================