#!/bin/sh

dir=/opt/tandbergtv/cms/conf/pmm/
file=$dir/pmm.properties

if grep scheduleExportSpecification $file >> /dev/null
 	then
		echo "pmm.properties is already upgraded";
		exit;
fi

message='\t \n scheduleExportSpecification=CableLabsVOD1.1'

# take backup of old file
cp $file $dir/pmm.properties.beforeUpgrade

# append the line as a part of upgrade
echo -e $message  >> $file