diff --git a/scripts/upgrade b/scripts/upgrade index 80f47d4..b98d9a0 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -39,9 +39,16 @@ 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 + 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" + mv $install_dir/config.local.user.php $tmp_data_backup/ +fi + + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -97,9 +104,6 @@ ynh_script_progression --message="Restore datas..." --weight=5 # Sync data directory backup rsync -a $tmp_data_backup/ $install_dir/data/ -if ynh_compare_current_package_version --comparison le --version 1.2.11~ynh4; then - ynh_replace_string --match_string="namespace Garradin;" --replace_string="namespace Paheko;" --target_file="$install_dir/data/config.local.user.php" -fi #================================================= # FIX PERMISSIONS