latest_mmt_version
This commit is contained in:
25
MMT_latest_version/sql/old/testingconf.sh
Normal file
25
MMT_latest_version/sql/old/testingconf.sh
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash -e
|
||||
HOME="/home/compegence/customer"
|
||||
#Directories
|
||||
homeDir=$HOME/MMT
|
||||
configDir=$homeDir/conf
|
||||
|
||||
openssl enc -aes-256-cbc -d -in $configDir/etl-config.dat > $configDir/etl-config.config -d -pass pass:$1
|
||||
|
||||
input_file=$configDir/etl-config.config
|
||||
declare -A credentials
|
||||
while IFS="=" read -r key value; do
|
||||
credentials[$key]=$value
|
||||
done < <( sed -e '/^\s*$/ d' -e '/^#/ d' $input_file )
|
||||
for i in ${credentials[@]}; do echo ***$i; done
|
||||
|
||||
rm $configDir/etl-config.config
|
||||
|
||||
user=${credentials[user]}
|
||||
password=${credentials[password]}
|
||||
host=${credentials[host]}
|
||||
db=${credentials[db]}
|
||||
protocol=${credentials[protocol]}
|
||||
server=${credentials[server]}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user