1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/paheko_ynh.git synced 2024-09-03 19:56:22 +02:00

delete the backup of config.local.php because this file must be edited with this upgrade

This commit is contained in:
Rodolphe Robles 2020-04-04 15:45:28 +02:00
parent a322817f71
commit ac55f98f90

View file

@ -9,12 +9,6 @@
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# Backup squlite, config.local.php and squelettes directory
#=================================================
sudo cp -avr /var/www/garradin/association.sqlite /tmp/association.sqlite
sudo cp -avr /var/www/garradin/www/squelettes /tmp/squelettes
sudo cp -avr /var/www/garradin/config.local.php /tmp/config.local.php
#=================================================
# LOAD SETTINGS
@ -56,6 +50,14 @@ elif [ "$is_public" = "No" ]; then
is_public=0
fi
#=================================================
# Backup squlite, config.local.php and squelettes directory
#=================================================
ynh_script_progression --message="Backing up the bdd and squelettes before upgrading (may take a while)..." --time --weight=1
sudo cp -avr /var/www/garradin/association.sqlite /tmp/association.sqlite
sudo cp -avr /var/www/garradin/www/squelettes /tmp/squelettes
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================
@ -114,10 +116,20 @@ then
fi
#=================================================
# backup bdd, squelettes directory and config.local.php
# Change options in file config.dist.php
# and copy in local.dist.php
#=================================================
sudo cp -a /tmp/config.local.php $final_path/config.local.php
sudo 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 = '/garradin/';" --target_file="$final_path/config.local.php"
#=================================================
# backup bdd, squelettes directory and config.local.php
#=================================================
sudo cp -a /tmp/association.sqlite $final_path/association.sqlite
sudo cp -avr /tmp/squelettes $final_path/www/squelettes