fix: properly fetch the internal ip on ubuntu 18.04
This commit is contained in:
1 parent
3b655fb6a1
commit
a585b07522
1 file changed
+1
-4
@@ -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
|
||||
|
||||
Reference in new issue
Block a user