diff options
author | platania <platania@research.att.com> | 2017-03-14 18:24:59 -0400 |
---|---|---|
committer | platania <platania@research.att.com> | 2017-03-14 18:24:59 -0400 |
commit | 2b5795c3773a1c568b1acdeb3f99463f57a0c072 (patch) | |
tree | bdd3dabe21b85723f6d0789d9a60d6292198a924 /boot/portal_vm_init.sh | |
parent | 2b556b22a1c446670a9e7f7030b24da136dbf45b (diff) |
update init scripts
Change-Id: If1b4a67fb5fda5125dc65b801974d1d1badc1364
Signed-off-by: platania <platania@research.att.com>
Diffstat (limited to 'boot/portal_vm_init.sh')
-rw-r--r-- | boot/portal_vm_init.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/boot/portal_vm_init.sh b/boot/portal_vm_init.sh index 05e969fc..0a2e51e9 100644 --- a/boot/portal_vm_init.sh +++ b/boot/portal_vm_init.sh @@ -33,7 +33,12 @@ sleep 180 if [ ! -e /opt/config/boot.txt ] then - 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 mysql -u root -p'Aa123456' -h $IP_ADDRESS < /opt/portal/deliveries/Apps_Users_OnBoarding_Script.sql echo "yes" > /opt/config/boot.txt fi |