1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/garradin_ynh.git synced 2024-09-03 18:36:17 +02:00

try to debug update script conditions

This commit is contained in:
Rodolphe Robles 2020-04-07 12:19:39 +02:00
parent 173d02455d
commit 6694f285f4

View file

@ -53,8 +53,8 @@ fi
#================================================= #=================================================
ynh_script_progression --message="Backing up the bdd and squelettes before upgrading (may take a while)..." --time --weight=1 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 bdd=$final_path/association.sqlite
squelettes=/var/www/garradin//www/squelettes squelettes=$final_path/www/squelettes
if [ -d "$squelettes" ] if [ -d "$squelettes" ]
then then
@ -122,21 +122,10 @@ then
ynh_setup_source --dest_dir="$final_path" ynh_setup_source --dest_dir="$final_path"
fi 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, squelettes directory and config.local.php
#================================================= #=================================================
backup_bdd=/tmp/association.sqlite backup_bdd=/tmp/association.sqlite
backup_squelettes=/tmp/squelettes backup_squelettes=/tmp/squelettes
@ -150,6 +139,18 @@ then
cp -a /tmp/association.sqlite $final_path/association.sqlite cp -a /tmp/association.sqlite $final_path/association.sqlite
fi 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 # NGINX CONFIGURATION
#================================================= #=================================================