From 6694f285f49040c5880c564e42edad936eb19388 Mon Sep 17 00:00:00 2001 From: Rodolphe Robles Date: Tue, 7 Apr 2020 12:19:39 +0200 Subject: [PATCH] try to debug update script conditions --- scripts/upgrade | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index ccc4ef0..06ddfde 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -53,8 +53,8 @@ fi #================================================= ynh_script_progression --message="Backing up the bdd and squelettes before upgrading (may take a while)..." --time --weight=1 -bdd=/var/www/garradin/association.sqlite -squelettes=/var/www/garradin//www/squelettes +bdd=$final_path/association.sqlite +squelettes=$final_path/www/squelettes if [ -d "$squelettes" ] then @@ -122,21 +122,10 @@ then ynh_setup_source --dest_dir="$final_path" fi -#================================================= -# Change options in file config.dist.php -# and copy in local.dist.php -#================================================= - -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" - - #================================================= # backup bdd, squelettes directory and config.local.php #================================================= + backup_bdd=/tmp/association.sqlite backup_squelettes=/tmp/squelettes @@ -150,6 +139,18 @@ then cp -a /tmp/association.sqlite $final_path/association.sqlite fi + +#================================================= +# Change options in file config.dist.php +# and copy in local.dist.php +#================================================= + +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" + #================================================= # NGINX CONFIGURATION #=================================================