Friday, June 14, 2013

TTRSS - Synchronization for changes to config.php-dist

This procedure requires you first setup the TTRSS UTILS environment described in the post:  TTRSS  UTILS - Fedora Tiny Tiny RSS Utilities

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:
  1. config.php-dist is considered authoritative, which means all of those changes will be merged into your new config.php
  2. 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.
  3. 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.
  4. 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
  5. 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.
  6. Your current config.php will be renamed and retained for 14 days
  7. A log will be created which shows actions that have occurred.  These actions are also displayed on your screen as the script is executing.
FIRST TIME USAGE:
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.

To run:
  1. cd $home
  2. cd ttrss_maint/ttrss_utils
  3. sudo ./cfg_ttrss

No comments:

Post a Comment