aboutsummaryrefslogtreecommitdiffstats
path: root/boot/policy_vm_init.sh
diff options
context:
space:
mode:
Diffstat (limited to 'boot/policy_vm_init.sh')
-rw-r--r--boot/policy_vm_init.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/boot/policy_vm_init.sh b/boot/policy_vm_init.sh
index 7febca20..bdb89be8 100644
--- a/boot/policy_vm_init.sh
+++ b/boot/policy_vm_init.sh
@@ -10,7 +10,14 @@ cd /opt/policy
git pull
chmod +x config/drools/drools-tweaks.sh
-IP_ADDRESS=$(ifconfig eth0 | grep "inet addr" | tr -s ' ' | cut -d' ' -f3 | cut -d':' -f2)
+
+if [ -e /opt/config/public_ip.txt ]
+then
+ IP_ADDRESS=$(cat /opt/config/public_ip.txt)
+else
+ IP_ADDRESS=$(ifconfig eth0 | grep "inet addr" | tr -s ' ' | cut -d' ' -f3 | cut -d':' -f2)
+fi
+
echo $IP_ADDRESS > config/pe/ip_addr.txt
docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO