##############################################################################################################
##    Script Name    : upgradeLookupKeys.sh                                                                 ##
##    Author         : Sanjay Khattar                                                                       ##
##    Created on     : 03/26/2013                                                                           ##
##    Usage          : ./upgradeLookupKeys.sh                                                               ##
##    Purpose        : Script for moving Lookup Keys from lookupKeys.txt to CMS database.                   ##
##                                                                                                          ##
##############################################################################################################

#!/bin/sh

##
## Upgrade lookup keys.
##

ACTIVITY="upgrading lookup keys"

logBeginMsg "$ACTIVITY"

LOOKUP_KEY_FILE_PATH="/opt/tandbergtv/cms/conf/contentMgmt/lookupKeys.txt"
UPGRADED_LOOKUP_KEY_FILE_PATH=$LOOKUP_KEY_FILE_PATH$UPGRADED_FILE_SUFFIX

homedir=$(pwd) 

cd ./upgrade20/dist
./lookup_key.sh

mv -vf $LOOKUP_KEY_FILE_PATH $UPGRADED_LOOKUP_KEY_FILE_PATH
  
cd $homedir

logDoneMsg "$ACTIVITY"
