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:
parent
a322817f71
commit
ac55f98f90
1 changed files with 20 additions and 8 deletions
|
@ -9,12 +9,6 @@
|
||||||
source _common.sh
|
source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
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
|
# LOAD SETTINGS
|
||||||
|
@ -56,6 +50,14 @@ elif [ "$is_public" = "No" ]; then
|
||||||
is_public=0
|
is_public=0
|
||||||
fi
|
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
|
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -114,10 +116,20 @@ then
|
||||||
fi
|
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 -a /tmp/association.sqlite $final_path/association.sqlite
|
||||||
sudo cp -avr /tmp/squelettes $final_path/www/squelettes
|
sudo cp -avr /tmp/squelettes $final_path/www/squelettes
|
||||||
|
|
Loading…
Add table
Reference in a new issue