cd /shelfx/c3po/Code
echo "Setting host file v3"
echo "nameserver 8.8.8.8" > /etc/resolv.conf
rm -f /etc/hosts
echo "127.0.0.1 raspberrypi" >> /etc/hosts
echo "127.0.0.1 localhost" >> /etc/hosts
echo "127.0.0.1 shelfx" >> /etc/hosts
echo "127.0.0.1 shelfx-rpi3" >> /etc/hosts
echo "192.241.240.152  redis01.shelfx.com" >> /etc/hosts
echo "192.30.253.112 github.com " >> /etc/hosts
echo "192.30.252.131  www.google.com " >> /etc/hosts
echo "216.185.153.86  www.shelfx.com " >> /etc/hosts
echo "104.236.116.196  sherpa.shelfx.com " >> /etc/hosts
echo "159.203.76.124 vpn.shelfx.com" >> /etc/hosts
echo "174.138.117.153 shelfx.com" >> /etc/hosts
echo "104.131.114.143 open.shelfx.com" >> /etc/hosts
echo "45.55.37.211 redis.shelfx.com" >> /etc/hosts
echo "188.166.128.32 files.shelfx.com" >> /etc/hosts

#USA Only
echo "159.203.70.153  secure.xcard.me " >> /etc/hosts
echo "45.55.100.35  lb.xcard.me " >> /etc/hosts
echo "45.55.100.35  us.xcard.me " >> /etc/hosts
echo "107.170.114.194 sockets.shelfx.com" >> /etc/hosts
echo "174.138.117.153 us.shelfx.com" >> /etc/hosts

#EU Only
echo "178.62.140.68  amsterdam.xcard.me " >> /etc/hosts
echo "178.62.140.68  eu.xcard.me " >> /etc/hosts
echo "188.166.128.33  lbeu.xcard.me " >> /etc/hosts
echo "5.101.96.190 socketseu.shelfx.com" >> /etc/hosts
echo "146.185.154.166 eu.shelfx.com" >> /etc/hosts

rm -rf update_version.sh
rm good_update_version.sh
wget -O update_version.sh https://sherpa.shelfx.com/releases/1?script=true --no-check-certificate
chmod 555 update_version.sh
./update_version.sh
pkill java
screen -x

