If you are running the Update Script for the TTRSS Trunk version described in another post, you can ignore this. The synchronization functionality is already built into that utility.
This posting is for those who don't wish to run the trunk version. It doesn't stop or start any services. It basically automatics the synchronization process, merging changes from the new config.php-dist and your existing config.php. The change logic is as follows:
- config.php-dist is considered authoritative, which means all of those changes will be merged into your new config.php
- If the particular statement in config.php-dist has not been modified from the previous version, and it matches your config.php that line will be displayed in GREEN. No action is required for that line.
- Changes made to your config.php will be preserved only if they are made to a define statement AND that define statement has not been changed in config.php-dist from the time it was originally cloned into your config.php. If your config.php statement has been carried over to the new config.php that line will be displayed in YELLOW. No further action is required for that line.
- If a define statement has been changed, it will replace whatever you had in your config.php - the assumption being that this is something which requires manual intervention. This line will be displayed in RED. You should use a program such as vim to examine both files and make the necessary changes, i.e. vim -d config.php config.php-dist
- If the define is completely new, it will included in your new config.php file and the line will be displayed in BLUE. You should look at the comments for that define in the new config.php and determine if any changes are required.
- Your current config.php will be renamed and retained for 14 days
- A log will be created which shows actions that have occurred. These actions are also displayed on your screen as the script is executing.
Run this utility BEFORE and AFTER the upgrade. This will allow the utility to create a "before-upgrade" image of "config.php-dist" to use for comparison purposes. If you have already upgraded, you won't be able to take advantage of this check for the first run - however, subsequent runs will be able to make this extra comparison. DO NOT delete or change the "config.php-dist_cfg_ttrss" file this utility creates.
- cd $home
- cd ttrss_maint/ttrss_utils
- sudo ./cfg_ttrss