SCR
SCR
SCR
/usr/bin/ksh
#!/bin/ksh
hstchk=$(hostname)
if [[ ${hstchk} = 'vm-f39f-4fb9' ]];then
rm /abinitio/tmp/envs/*.env
rm .sandbox.pset
cp .sandbox.pset_temp .sandbox.pset
#chmod 777 .sandbox.pset
rm /optware/abinitio-AppHub-V3.2.6.15/config/apphubrc
rm /optware/abinitio-V3.2.6.15/config/abinitiorc
rm /opt/abinitio_config/*
fi
emchk=0
rcfile () {
rcpth=${pth}/config
echo "ORC path >> ${rcpth}"
echo "b>> ${b}"
if [[ ${b} = 'AppHub' ]];then
if [[ ${(find "${rcpth}/apphubrc" | wc -l)} = '0' ]] 2>'/dev/null';then
echo "Apphurc loop"
rcfnm=$(ls -tr ${rcpth}/apphubrc.example |rev|cut -d "/" -f1 |cut -d "." -f2|rev)
echo " Created ${rcfnm} in path ${rcpth}"
touch ${rcpth}/${rcfnm}
cat /abinitio/tmp/apphubrc_temp >> ${rcpth}/${rcfnm} #change
sed -i "s|vr|${v}|g" ${rcpth}/${rcfnm}
aprcpth=$rcpth
else
echo "Apphubrc is present"
fi
else
#elif [[ $(ls -ltr ${rcpth} | grep -i ${a}rc | wc -l = '0') ]];then
if [[ ${( find ${rcpth}/abinitiorc | wc -l)} = '0' ]] 2>'/dev/null';then
fi
clear
else
echo "creating abinitiorc 3"
echo "Shared.abinitio is present"
rcfnm=$(ls -tr "${rcpth}/abinitiorc.example" |rev|cut -d "/" -f1| cut -d "." -
f2|rev)
echo " Created ${rcfnm} in path ${rcpth}"
touch "${rcpth}/${rcfnm}"
echo "# system-wide config var settings
@include /opt/abinitio_config/shared.abinitiorc" >> ${rcpth}/${rcfnm}
fi
fi }
stenv () {
printf "################Enter the MFS partition value you need to create for this
Server >> "
read mfs
sed -i "12 s|Line12|"$mfs"|" $(pwd)/.sandbox.pset
(find ${stpth}) 2>'/dev/null'
if [[ $? = '1' ]];then
printf "\n"
tmpstpth=$( echo ${stpth} | rev | cut -d "/" -f2- | rev )
echo " $tmpstpth is not present ,Creating it" #mkdir -p ${stpth}
printf "\n"
fi
exprt() {
if [[ $(cat ${Epath}/${Fenv} | grep -w "Line1" | wc -l) = '1' ]] ; then
sed -i "s|\<Line1\>|$pth|" ${Epath}/${Fenv}
sed -i "s/\<Line2\>/Line1/" ${Epath}/${Fenv}
sed -i "s|\<Line1\>|$pth|" $(pwd)/.sandbox.pset
sed -i "s|\<Line2\>|Line1|" $(pwd)/.sandbox.pset
else
echo "########################Follwing Env Variable(s) of ${a} are needed for to be
customized ,Enter the LINE NUMBER and VARIABLE Value when
Prompted############################# :"
sed -n "/Line/p" ${Epath}/${Fenv}
printf "\n"
printf "#######################Enter the line number which you want to change >> "
read ln 2>'/dev/null'
printf "########################Enter the Env Variable Value for corresponding Line
>> "
read -r vl 2>'/dev/null'
sed -i "$ln s|Line$ln|"$vl"|" ${Epath}/${Fenv}
if [[ ${ln} = '10' ]] && [[ ${a} = 'abinitioCoOp' ]];then
stpth=$vl
vl=$(echo "$vl" | rev | cut -d "/" -f 2- | rev)
#echo "Line 10 check :$vlcheck:$stpth"
sed -i "s|Line$ln|"$vl"|" $(pwd)/.sandbox.pset
stenv
fi
else
sed -i "s|Line$ln|"$vl"|" $(pwd)/.sandbox.pset
fi
fi
echo " "
}
install () {
ex=$(echo ${i[$t]} | rev|cut -d "/" -f1 |rev)
expath=$(echo ${i[$t]} | rev|cut -d "/" -f2- |rev)
echo " Exceutable name ${ex}; Executable path ${expath}"
echo " Installing ${a} software in ${pth}"
if [[ ${a} = 'MSTGenericClient' ]] || [[ ${a} = 'RSCD89_CTO' ]] || [[ ${a} =
'abinitioBRDServices' ]] ;then
#continue
#echo $?
break
else
cpth=$(pwd)
cd ${cpth}
tmpf=${(ls -tr | grep -i ${a})}
#echo ${tmpf}
file=$(echo ${tmpf} | rev | cut -d ":" -f1 | rev)
Fenv=$(echo ${file} | sed -e "s/temp/$v/g")
echo "Env file will be named as ${Fenv}"
#echo "flg: ${flg},Version:${v},Abinitio version:${AbV}"
if [[ ${flg} = '1' ]] && [[ ${v} = ${AbV} ]];then
Epath="${Abpth}"
exprt
continue
else
echo "**************************************************************
Do you need to create env file in /abinitio/tmp/envs,
Enter 0 for this set up
OR
Enter the path
*******************************" #path needs to be changed
read -r Epath 2>'/dev/null'
fi
if [[ ${Epath} = '0' ]];then
Epath="/abinitio/tmp/envs"
if [[ $(echo ${Fenv} | cut -d "-" -f1) = 'ste' ]] && [[ ${flg} = '0' ]];then
((flg++))
AbV=${v}
Abpth="${Epath}"
stAb=${Fenv}
fi
if [[ ${(find ${Epath}/${Fenv} | wc -l )} = '1' ]] 2>'/dev/null' ;then
continue
else
create
fi
else
if [[ ${(find ${Epath}/${Fenv} | wc -l)} = '1' ]] 2>'/dev/null';then
continue
else
create
fi
fi
exprt
fi
tpth=${Epath}/${Fenv}
env
}
case ${in} in
"1")
printf "##########Enter the number of Executable files(RPM) needed to be installed
on this server >> "
read num
sleep 3
clear
***********************************************************************************
************************************** "
echo "##########As per Input $num binaries will be installed on the server "
#sleep 2
#clear
ch=0
x=0
ac=0
flg=0
while [[ "$x" -lt "$num" ]];
do
printf "Enter the Complete Path of exceutable >> "
read -r i[$x] 2>'/dev/null'
printf "\n"
a=$(echo ${i[$x]} | rev | cut -d "." -f1 | rev );if [[ ${a} = 'rpm' ]];then echo "
"; else echo "Path for ${i[$x]} is not ending with 'rpm' , Please enter the
Complete path" ; read -r i[$x] 2>'/dev/null';fi
#echo "###################################################"
#if [[ ${x} -ge 1 ]];then
echo "***************************************************"
sleep 3
clear
$((t++)) 2>'/dev/null'
done
echo " Do you have want to set up Bias Keys also ? Enter y >> (Yes) or n >> (No) "
read bch
if [[ ${bch} = 'y' ]];then
echo "Loading env file .$Abpth/$stAb "
sleep 1
clear
echo " Giving read permission to Path /sys/devices/virtual/dmi/id/product_uuid� "
#chmod +r /sys/devices/virtual/dmi/id/product_uuid�
sleep 2
clear
printf "Enter Key File path >> "
read -r kypth
printf "\n"
echo "Adding key file to Abinitio Env"
sleep 2
clear
#ab-cinfo-util create -version 4�
#key file path i/p from user
#ab-key add <key file>
#test-abinitio
#ab-key show
fi
echo "********************Setup is Completed*********************"
;;
"2") (.${pwd}/test.ksh)
;;
*);;
esac
*****************************************888
export AB_HOME=/opt/abinitio2158
export AB_APPLICATION_HUB=/optware/abinitio-app-hub-3266
export AB_AIR_ROOT=//aisteemed/abinitio/eme/cits/ste-dev
export PATH=$AB_HOME/bin:/usr/sbin:$PATH
export LD_LIBRARY_PATH=${AB_HOME}/lib:${LD_LIBRARY_PATH}
export USER=${USER:-${LOGNAME:-$(basename $HOME)}}
export COMPREFIX=/abinitio/apps/
export STE_ENVIRONMENT_NAME=CitiTech
*********************************************
/net/stealth/export1/home1.localhost/sw/Linux/abinitioCoOp-V3.2.6.15.Full-
Linux.x86_64_93107@[email protected]
/net/stealth/export1/home1.localhost/sw/Linux/jdk-1.8.0_171l64-linux.x86_64.rpm
/net/stealth/export1/home1.localhost/sw/Linux/MSTGenericClient-1.0_A0_0.0-
159223.i686_1.0_A0_0.0@[email protected]
/net/stealth/export1/home1.localhost/sw/Linux/oraK1CL-L-12.2.0.1-SOE.x86_64.rpm
/net/stealth/export1/home1.localhost/sw/Linux/abinitioCoOp-AppHub-V3.2.6.15.Full-
Linux.x86_64_97506@[email protected]
export STE_COMPREFIX=/abinitio/apps/
export STE_ENV_ROOT=/abinitio/apps/ste-stable/CitiTech/stdenv
#####################################################
(cat $line1 | grep -i $val |cut -d "=" -f2| sed "s|[^ ]||g" | sed -e "s|^$|$res|")