From 6e4952f263db8855f23c48f5c13d26debfa73042 Mon Sep 17 00:00:00 2001 From: Stefan Pejcic Date: Mon, 3 Jun 2024 19:52:19 +0200 Subject: [PATCH] Update INSTALL.sh --- INSTALL.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/INSTALL.sh b/INSTALL.sh index e9a866bd..6b1dc3cc 100644 --- a/INSTALL.sh +++ b/INSTALL.sh @@ -5,7 +5,7 @@ # Usage: cd /home && (curl -sSL https://get.openpanel.co || wget -O - https://get.openpanel.co) | bash # Author: Stefan Pejcic # Created: 11.07.2023 -# Last Modified: 02.06.2024 +# Last Modified: 03.06.2024 # Company: openpanel.co # Copyright (c) OPENPANEL # @@ -178,7 +178,9 @@ current_ip=$(curl -s https://ip.openpanel.co || wget -qO- https://ip.openpanel.c # If site is not available, get the ipv4 from the hostname -I if [ -z "$current_ip" ]; then - current_ip=$(hostname -I | awk '{print $1}') + # current_ip=$(hostname -I | awk '{print $1}') + # ip addr command is more reliable then hostname - to avoid getting private ip + current_ip=$(ip addr|grep 'inet '|grep global|head -n1|awk '{print $2}'|cut -f1 -d/) fi