Commit 5b33924c authored by Valentino Lauciani's avatar Valentino Lauciani
Browse files

Update 'server_name' variabile with LoadBancer IP into 'nginx/conf.d/cnt.conf' file

parent a3d7cd8e
......@@ -8,7 +8,6 @@ gitRepoName=$5
gitSshPrivateKey=$6
# git@gitHostName:gitGroupName/gitRepoName.git
OUTPUTFILE="/tmp/`basename $0`.log"
GITBASEDIR=/opt/gitwork
......@@ -16,6 +15,8 @@ GITBASEDIRCURREPO=${GITBASEDIR}/group__${gitGroupName}/${gitRepoName}
SSHBASEDIR=/root/.ssh
TMPFILEKEY=/tmp/tmp_key
LOADBALANCER_IP="13.80.20.174"
SERVER_NAME=$( uname -n )
SERVER_IP=$(ip route get 8.8.8.8 | awk '/8.8.8.8/ {print $NF}')
......@@ -141,6 +142,8 @@ configure_nginx()
sed -i'' -e "s/worker_processes [0-9][0-9]*;/worker_processes ${nginx_n_work_processes};/" nginx.conf
cd ${GITBASEDIRCURREPO}/cnt.rm.ingv.it/root/etc/nginx/conf.d
# Set 'server_name' with correct IP
sed -i'' -e "s/server_name.*;/server_name ${IP_LOADBALANCER};/" cnt.conf
cd /etc/nginx
mv nginx.conf nginx.conf.ORIGINAL
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment