fix: properly fetch the internal ip on ubuntu 18.04

This commit is contained in:
Jose Diaz-Gonzalez
2021-03-22 04:48:30 -04:00
parent 3b655fb6a1
commit a585b07522

View File

@@ -2,12 +2,9 @@
set -eo pipefail
set -x
echo "=====> ifconfig"
ifconfig
echo "=====> set hostname"
hostname
internal_ip="$(ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}')"
internal_ip="$(ifconfig eth0 | grep 'inet ' | awk '{print $2}')"
sudo hostname "dokku.me"
echo "dokku.me" | sudo tee /etc/hostname
hostname