##############################################################################################################
##    Script Name    : upgradeContentMgmtPropertiesFile.sh                                                  ##
##    Author         : Sanjay Khattar                                                                       ##
##    Created on     : 05/22/2013                                                                           ##
##    Usage          : ./upgradeContentMgmtPropertiesFile.sh                                                ##
##    Purpose        : Script for upgrading cms/conf/contentMgmt/contentMgmt.properties file.               ##
##                                                                                                          ##
##############################################################################################################

#!/bin/sh

##
## This script upgrades contentMgmt.properties file.  
##

CONTENT_MGMT_PROPERTIES_FILE_PATH=/opt/tandbergtv/cms/conf/contentMgmt/contentMgmt.properties
UPGRADED_CONTENT_MGMT_PROPERTIES_FILE_PATH=/opt/tandbergtv/cms/conf/contentMgmt/contentMgmt.properties$UPGRADED_FILE_SUFFIX
TITLELIST_MGMT_PROPERTIES_DIR=/opt/tandbergtv/cms/conf/titleListMgmt
TITLELIST_MGMT_PROPERTIES_FILE_PATH=$TITLELIST_MGMT_PROPERTIES_DIR/titleListMgmt.properties

ACTIVITY="upgrading CONTENT_MGMT_PROPERTIES_FILE_PATH=$CONTENT_MGMT_PROPERTIES_FILE_PATH"

logBeginMsg "$ACTIVITY"

mkdir -pv $TITLELIST_MGMT_PROPERTIES_DIR
cp -v $CONTENT_MGMT_PROPERTIES_FILE_PATH $UPGRADED_CONTENT_MGMT_PROPERTIES_FILE_PATH
mv -vf $CONTENT_MGMT_PROPERTIES_FILE_PATH $TITLELIST_MGMT_PROPERTIES_FILE_PATH

logDoneMsg "$ACTIVITY"
