diff --git a/scripts/restore b/scripts/restore index dc0c5de..cfd17f9 100644 --- a/scripts/restore +++ b/scripts/restore @@ -27,7 +27,7 @@ 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.2.11~ynh4; then +if ynh_compare_current_package_version --comparison le --version 1.3.0~ynh8; then chmod 660 "$install_dir/config.local.user.php" else chmod 660 "$install_dir/data/config.local.user.php" diff --git a/scripts/upgrade b/scripts/upgrade index b98d9a0..e10c8a6 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -38,13 +38,12 @@ 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~ynh4; then +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/ fi -if ynh_compare_current_package_version --comparison le --version 1.3.0~ynh8; then - ynh_replace_string --match_string="namespace Garradin;" --replace_string="namespace Paheko;" --target_file="$install_dir/config.local.user.php" +if ynh_compare_current_package_version --comparison le --version 1.3.0~ynh9; then mv $install_dir/config.local.user.php $tmp_data_backup/ fi