mirror of
https://github.com/YunoHost-Apps/paheko_ynh.git
synced 2024-09-03 19:56:22 +02:00
fix how keep the file config.local.user.php on data folder path
This commit is contained in:
parent
ff4718b26f
commit
150a2380aa
2 changed files with 6 additions and 11 deletions
|
@ -26,11 +26,8 @@ find "$install_dir/data" -type d -exec chmod 770 {} +
|
|||
find "$install_dir/data" -type f -exec chmod 660 {} +
|
||||
chmod 440 "$install_dir/config.local.php"
|
||||
chmod 440 "$install_dir/config.local.yunohost.php"
|
||||
|
||||
if ynh_compare_current_package_version --comparison le --version 1.3.0~ynh8; then
|
||||
if [[ -f "$install_dir/config.local.user.php" ]]; then
|
||||
chmod 660 "$install_dir/config.local.user.php"
|
||||
else
|
||||
chmod 660 "$install_dir/data/config.local.user.php"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -38,16 +38,14 @@ ynh_script_progression --message="Backup of the DB in temporary file...." --weig
|
|||
tmp_data_backup=$(mktemp -d)
|
||||
rsync -a $install_dir/data/ $tmp_data_backup/
|
||||
|
||||
if ynh_compare_current_package_version --comparison le --version 1.2.11~ynh1; then
|
||||
ynh_replace_string --match_string="namespace Garradin;" --replace_string="namespace Paheko;" --target_file="$install_dir/config.local.user.php"
|
||||
mv $install_dir/config.local.user.php $tmp_data_backup/
|
||||
if [[ -f "$install_dir/config.local.user.php" ]]; then
|
||||
cp -a $install_dir/config.local.user.php $tmp_data_backup/
|
||||
fi
|
||||
|
||||
if ynh_compare_current_package_version --comparison le --version 1.3.0~ynh9; then
|
||||
mv $install_dir/config.local.user.php $tmp_data_backup/
|
||||
if [[ $(grep "Garradin" $tmp_data_backup/config.local.user.php) ]] ; then
|
||||
ynh_replace_string --match_string="namespace Garradin;" --replace_string="namespace Paheko;" --target_file="$tmp_data_backup/config.local.user.php"
|
||||
fi
|
||||
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue